json-crud-api 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json-crud-api/presenter.rb +1 -0
- data/spec/unit/presenter_spec.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79b2e0ca071a00b36b5255b2f4168b274e16f0bf
|
4
|
+
data.tar.gz: 767ca5c4018742511b7e539fcdf10fa0c34a2498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42c783872ea7f4e68a32d1d48f86a5baa960fa82a53f94045c8ca1c2099c51ea0448a9a02f7cb18bbbc63a6a8f492caff3621abd47538eb63c2167905d26458e
|
7
|
+
data.tar.gz: 64c631939a0817a09aae149993dd853a23e5d0fd302f4f4716c426f4a2eadf2eccaf94d767c6a2d200388cb65aca57cddb2a4c2fcc38a0f3041733ee74911887
|
data/spec/unit/presenter_spec.rb
CHANGED
@@ -6,12 +6,16 @@ describe JsonCrudApi::Presenter do
|
|
6
6
|
|
7
7
|
@presenter = JsonCrudApi::Presenter.new({
|
8
8
|
:model => @mock_model,
|
9
|
+
:include => { :no_operation => 10 },
|
10
|
+
:exclude => { :no_operation => 11 }
|
9
11
|
})
|
10
12
|
end
|
11
13
|
|
12
14
|
describe '#initialize' do
|
13
15
|
it 'should inject dependencies correctly' do
|
14
16
|
@presenter.model.should be @mock_model
|
17
|
+
@presenter.include.should eq({ :no_operation => 10 })
|
18
|
+
@presenter.exclude.should eq({ :no_operation => 11 })
|
15
19
|
end
|
16
20
|
|
17
21
|
it 'should throw an exception if model is not set' do
|