<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,4 @@
 build
 *.mode1v3
-*.pbxuser
\ No newline at end of file
+*.pbxuser
+*.o
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -13,10 +13,11 @@
 
 @end
 
+
 // This initialization function gets called when we import the Ruby module.
 // It doesn't need to do anything because the RubyCocoa bridge will do
 // all the initialization work.
 // The rbiphonetest test framework automatically generates bundles for 
 // each objective-c class containing the following line. These
 // can be used by your tests.
-void Init_FmdbMigrationManager() { }
\ No newline at end of file
+void Init_FmdbMigrationManager() { }</diff>
      <filename>Classes/FmdbMigrationManager.m</filename>
    </modified>
    <modified>
      <diff>@@ -10,11 +10,19 @@ end
 
 task :compile =&gt; &quot;objc:compile&quot;
 
-file &quot;build/fmdb.o&quot; =&gt; FileList['fmdb/FM*'] do
-  files = FileList['fmdb/FM*.m'].map { |f| &quot;-c #{f}&quot; }.join(&quot; &quot;)
-  sh &quot;gcc #{files} -framework Foundation -lsqlite3 -I#{fmdb_dir} -o build/fmdb.o&quot;
+fmdb_dir = File.dirname(__FILE__) + &quot;/fmdb&quot;
+
+FileList['fmdb/FM*.m'].each do |fmdb_file|
+  FileUtils.mkdir_p &quot;build&quot;
+  base = fmdb_file.gsub(/\.m$/,'')
+  dot_o = &quot;build/#{File.basename base}.o&quot;
+  file dot_o =&gt; [&quot;#{base}.m&quot;, &quot;#{base}.h&quot;] do
+    sh &quot;gcc -c #{base}.m -o #{dot_o}&quot;
+  end
 end
 
+fmdb_o_files = FileList['fmdb/FM*.m'].map { |fmdb_file| File.join(&quot;build&quot;, File.basename(fmdb_file).gsub(/m$/,'o')) }
+
 namespace :objc do
   # look for Classes/*.m files containing a line &quot;void Init_ClassName&quot;
   # These are the primary classes for bundles; make a bundle for each
@@ -23,7 +31,7 @@ namespace :objc do
     path =~ /Classes\/(.*)\.m/
     model_name = $1
 
-    task :compile =&gt; model_name do
+    task :compile =&gt; &quot;build/bundles/#{model_name}.bundle&quot; do
       if Dir.glob(&quot;**/#{model_name}.bundle&quot;).length == 0
         STDERR.puts &quot;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&quot;
         STDERR.puts &quot;Bundle actually failed to build.&quot;
@@ -32,14 +40,11 @@ namespace :objc do
       end
     end
 
-    task model_name.to_sym =&gt; &quot;build/bundles/#{model_name}.bundle&quot;
-
-    fmdb_dir = File.dirname(__FILE__) + &quot;/fmdb&quot;
-    
-    file &quot;build/bundles/#{model_name}.bundle&quot; =&gt; [&quot;Classes/#{model_name}.m&quot;, &quot;Classes/#{model_name}.h&quot;] do |t|
+    file &quot;build/bundles/#{model_name}.bundle&quot; =&gt; fmdb_o_files + [&quot;Classes/#{model_name}.m&quot;, &quot;Classes/#{model_name}.h&quot;] do |t|
       FileUtils.mkdir_p &quot;build/bundles&quot;
       FileUtils.rm Dir[&quot;build/bundles/#{model_name}.bundle&quot;]
-      sh &quot;gcc -o build/bundles/#{model_name}.bundle -o build/fmdb.o -bundle -framework Foundation -lsqlite3 -I#{fmdb_dir} Classes/#{model_name}.m&quot;
+      fmdb_files = FileList['build/FM*.o'].join(&quot; &quot;)
+      sh &quot;gcc -o build/bundles/#{model_name}.bundle #{fmdb_files} -bundle -framework Foundation -lsqlite3 -I#{fmdb_dir} Classes/#{model_name}.m&quot;
     end
   end
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,23 @@ require &quot;FmdbMigrationManager.bundle&quot;
 OSX::ns_import :FmdbMigrationManager
 
 class TestFmdbMigrationManager &lt; Test::Unit::TestCase
-  def test_fmdb_migration_manager_class_exists
-    OSX::FmdbMigrationManager
+  should &quot;have FmdbMigrationManager class&quot; do
+    assert OSX::FmdbMigrationManager
   end
+  
+  context &quot;with clean sqlite db&quot; do
+    setup do
+      @db_path = &quot;/tmp/fmdb-test.db&quot;
+      @db = OSX::FMDatabase.databaseWithPath @db_path
+    end
+    
+    teardown do
+      FileUtils.rm @db_path if File.exists?(@db_path)
+    end
+
+    should &quot;create sqlite db&quot; do
+      assert File.exists?(@db_path)
+    end
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>test/test_fmdb_migration_manager.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,9 @@
 require &quot;test/unit&quot;
 require &quot;osx/cocoa&quot;
 
-$:.unshift File.dirname(__FILE__) + &quot;/../build/bundles&quot;
\ No newline at end of file
+$:.unshift File.dirname(__FILE__) + &quot;/../build/bundles&quot;
+
+require &quot;fileutils&quot;
+require &quot;rubygems&quot;
+gem 'Shoulda'
+require &quot;Shoulda&quot;
\ No newline at end of file</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1ba45c97b5e7ce7fe8d0e95837b7e69da9f06edf</id>
    </parent>
  </parents>
  <author>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </author>
  <url>http://github.com/drnic/fmdb-migration-manager/commit/f5f0b50d06126f5d69fc8b3e1afb4cabd383b0b2</url>
  <id>f5f0b50d06126f5d69fc8b3e1afb4cabd383b0b2</id>
  <committed-date>2008-09-06T00:01:15-07:00</committed-date>
  <authored-date>2008-09-06T00:01:15-07:00</authored-date>
  <message>successfully building bundle that includes fmdb + my migration class</message>
  <tree>3546da37143cd893cfcdf796dd621f9fe302d9f0</tree>
  <committer>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </committer>
</commit>
