spec/zertico/accessor_spec.rb in zertico-0.5.4 vs spec/zertico/accessor_spec.rb in zertico-0.5.5
- old
+ new
@@ -6,20 +6,32 @@
context 'on a namespaced accessor and interface model' do
it 'should find the interface model' do
Person::ProfileAccessor.send(:interface_class).should == Person::Profile
end
+
+ it 'should return a valid instance variable name' do
+ Person::ProfileAccessor.send(:interface_name).should == 'profile'
+ end
end
context 'on a namespaced accessor and non namespaced interface model' do
it 'should find the interface model' do
Admin::UserAccessor.send(:interface_class).should == User
end
+
+ it 'should return a valid instance variable name' do
+ Admin::UserAccessor.send(:interface_name).should == 'user'
+ end
end
context 'on a non namespaced accessor and non namespaced interface model' do
it 'should find the interface model' do
UserAccessor.send(:interface_class).should == User
+ end
+
+ it 'should return a valid instance variable name' do
+ UserAccessor.send(:interface_name).should == 'user'
end
end
describe '.find' do
before :each do
\ No newline at end of file