diff --git a/spec/models/pomodoro_persistence_spec.rb b/spec/models/pomodoro_persistence_spec.rb index 96147ff..14dd6b7 100644 --- a/spec/models/pomodoro_persistence_spec.rb +++ b/spec/models/pomodoro_persistence_spec.rb @@ -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 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 58d9f7f..d427702 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,5 +4,3 @@ require 'matchy' require 'test/unit' -APP_ROOT = File.expand_path(File.dirname(__FILE__) + "/..") -APP_NAME = "PomodoriXCode" diff --git a/spec/test_mom/Pomodori.mom b/spec/test_mom/Pomodori.mom new file mode 100644 index 0000000..9cf41c3 Binary files /dev/null and b/spec/test_mom/Pomodori.mom differ