Skip to content

Commit

Permalink
now using a test database
Browse files Browse the repository at this point in the history
  • Loading branch information
reborg committed Dec 27, 2009
1 parent 233372d commit ae2c8a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions spec/models/pomodoro_persistence_spec.rb
Expand Up @@ -4,12 +4,12 @@

class PomodoroPersistenceSpec < Test::Unit::TestCase
it 'retrieve the count of saved pomodoros' do
Persistence.stubs(:object_model_from_bundle).returns(mom)
Pomodoro.count.should == 15
Persistence.stubs(:object_model_from_bundle).returns(test_mom)
Pomodoro.count.should == 59
end
end

def mom
bundle = NSBundle.bundleWithPath(APP_ROOT + "/build/Debug/#{APP_NAME}.app/")
def test_mom
bundle = NSBundle.bundleWithPath(File.dirname(__FILE__) + "/../test_mom")
NSManagedObjectModel.mergedModelFromBundles([bundle])
end
2 changes: 0 additions & 2 deletions spec/spec_helper.rb
Expand Up @@ -4,5 +4,3 @@
require 'matchy'
require 'test/unit'

APP_ROOT = File.expand_path(File.dirname(__FILE__) + "/..")
APP_NAME = "PomodoriXCode"
Binary file added spec/test_mom/Pomodori.mom
Binary file not shown.

0 comments on commit ae2c8a8

Please sign in to comment.