spec/zertico/service_spec.rb in zertico-1.1.0 vs spec/zertico/service_spec.rb in zertico-1.1.1
- old
+ new
@@ -125,38 +125,38 @@
it 'should return an object' do
controller.delete.should == object
end
end
- context '#resource' do
+ context '#resource_source' do
context 'with no resource defined' do
before :each do
controller.stub(:interface_class => User)
end
it 'should return the resource' do
- controller.resource.should == User
+ controller.resource_source.should == User
end
end
context 'with a resource defined' do
before :each do
- controller.resource = %w(Person::Profile)
+ controller.resource_source = %w(Person::Profile)
end
it 'should return the resource' do
- controller.resource.should == Person::Profile
+ controller.resource_source.should == Person::Profile
end
end
end
context '#resource=' do
before :each do
User.stub(:all => [ object ])
- controller.resource = %w(User all)
+ controller.resource_source = %w(User all)
end
it 'should set the resource' do
- controller.resource.should == [ object ]
+ controller.resource_source.should == [ object ]
end
end
end
\ No newline at end of file