test/lib/vedeu/repositories/repository_test.rb in vedeu-0.8.9 vs test/lib/vedeu/repositories/repository_test.rb in vedeu-0.8.10

- old
+ new

@@ -122,11 +122,11 @@ end context 'when there something in focus' do before { Vedeu.stubs(:focus).returns('zinc') } - it { subject.must_be_instance_of(Vedeu::Repositories::TestModel) } + it { subject.must_be_instance_of(model) } end end describe '#find' do subject { instance.find(model_name) } @@ -167,11 +167,11 @@ end end end describe '#find_or_create' do - let(:model_instance) { Vedeu::Repositories::TestModel.new('niobium') } + let(:model_instance) { model.new('niobium') } before { Vedeu.stubs(:log) } subject { instance.find_or_create(model_name) } @@ -185,11 +185,11 @@ context 'when the model does not exist' do let(:model_name) { 'zinc'} it 'creates and stores a new instance of the model' do - subject.must_be_instance_of(Vedeu::Repositories::TestModel) + subject.must_be_instance_of(model) end end end describe '#inspect' do @@ -230,21 +230,21 @@ end context 'when the model is not registered' do before { instance.reset - instance.store(Vedeu::Repositories::TestModel.new('zinc')) + instance.store(model.new('zinc')) } it { subject.must_be_instance_of(FalseClass) } end context 'when the model is registered' do before { instance.reset - instance.store(Vedeu::Repositories::TestModel.new('gadolinium')) - instance.store(Vedeu::Repositories::TestModel.new('francium')) + instance.store(model.new('gadolinium')) + instance.store(model.new('francium')) } it 'returns the storage with the model removed' do subject.size.must_equal(1) end @@ -267,10 +267,10 @@ end context 'when a name attributes is provided' do let(:model_name) { 'hydrogen' } - it { subject.must_be_instance_of(Vedeu::Repositories::TestModel) } + it { subject.must_be_instance_of(model) } end end describe '#register' do it { instance.must_respond_to(:register) }