zertico 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zertico/accessor.rb +1 -1
- data/lib/zertico/version.rb +1 -1
- data/spec/zertico/accessor_spec.rb +12 -0
- data/spec/zertico/controller_spec.rb +2 -2
- metadata +3 -3
data/lib/zertico/accessor.rb
CHANGED
data/lib/zertico/version.rb
CHANGED
@@ -8,18 +8,30 @@ describe Zertico::Accessor do
|
|
8
8
|
it 'should find the interface model' do
|
9
9
|
Person::ProfileAccessor.send(:interface_class).should == Person::Profile
|
10
10
|
end
|
11
|
+
|
12
|
+
it 'should return a valid instance variable name' do
|
13
|
+
Person::ProfileAccessor.send(:interface_name).should == 'profile'
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
context 'on a namespaced accessor and non namespaced interface model' do
|
14
18
|
it 'should find the interface model' do
|
15
19
|
Admin::UserAccessor.send(:interface_class).should == User
|
16
20
|
end
|
21
|
+
|
22
|
+
it 'should return a valid instance variable name' do
|
23
|
+
Admin::UserAccessor.send(:interface_name).should == 'user'
|
24
|
+
end
|
17
25
|
end
|
18
26
|
|
19
27
|
context 'on a non namespaced accessor and non namespaced interface model' do
|
20
28
|
it 'should find the interface model' do
|
21
29
|
UserAccessor.send(:interface_class).should == User
|
22
30
|
end
|
31
|
+
|
32
|
+
it 'should return a valid instance variable name' do
|
33
|
+
UserAccessor.send(:interface_name).should == 'user'
|
34
|
+
end
|
23
35
|
end
|
24
36
|
|
25
37
|
describe '.find' do
|
@@ -112,8 +112,8 @@ describe Zertico::Controller do
|
|
112
112
|
|
113
113
|
context '#update' do
|
114
114
|
before :each do
|
115
|
-
controller.
|
116
|
-
controller.stub(:params).and_return({:id => 1, :user => 'user' })
|
115
|
+
controller.stub_chain(:interface_name, :to_sym).and_return(:user)
|
116
|
+
controller.stub(:params).and_return({ :id => 1, :user => 'user' })
|
117
117
|
controller.stub(:modify => { :user => 'user' })
|
118
118
|
controller.stub(:respond_with)
|
119
119
|
controller.update
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zertico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
segments:
|
114
114
|
- 0
|
115
|
-
hash: -
|
115
|
+
hash: -1530396319492029873
|
116
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
segments:
|
123
123
|
- 0
|
124
|
-
hash: -
|
124
|
+
hash: -1530396319492029873
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
127
|
rubygems_version: 1.8.25
|