to_api 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/to_api/version.rb +1 -1
- data/lib/to_api.rb +1 -1
- data/spec/to_api_spec.rb +20 -0
- metadata +4 -4
data/lib/to_api/version.rb
CHANGED
data/lib/to_api.rb
CHANGED
data/spec/to_api_spec.rb
CHANGED
@@ -110,6 +110,26 @@ describe '#to_api' do
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
+
describe TrueClass do
|
114
|
+
it "returns self" do
|
115
|
+
true.to_api.should == true
|
116
|
+
end
|
117
|
+
describe "ingoring includes" do
|
118
|
+
let(:instance) { true }
|
119
|
+
it_should_behave_like "ignoring includes"
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe FalseClass do
|
124
|
+
it "returns self" do
|
125
|
+
false.to_api.should == false
|
126
|
+
end
|
127
|
+
describe "ingoring includes" do
|
128
|
+
let(:instance) { false }
|
129
|
+
it_should_behave_like "ignoring includes"
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
113
133
|
describe ActiveRecord::NamedScope::Scope do
|
114
134
|
it "returns to_api of its kids" do
|
115
135
|
FakeRecord.should_receive(:reflect_on_all_associations).and_return([mock(:name => "fake_child_records")])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: to_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Shawn Anderson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-06-07 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|