acfs 0.25.0.1.b227 → 0.25.0.1.b228
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +3 -1
- data/spec/acfs/configuration_spec.rb +1 -1
- data/spec/acfs/model/attributes_spec.rb +1 -1
- data/spec/acfs/model/initialization_spec.rb +1 -1
- data/spec/acfs/model/persistance_spec.rb +2 -2
- data/spec/acfs/model/query_methods_spec.rb +2 -2
- data/spec/acfs/model/validation_spec.rb +1 -1
- data/spec/acfs/request/callbacks_spec.rb +1 -1
- data/spec/acfs/service/middleware_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTlhZThlYmY2OGJlZmQ5ZTQ2NjA0YzM0NzYxODgwYjNiNDkxOTA3MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzI3ZTAwNDIxMTIwMGVkMmE1OGNiMDEzNTA3NDU3MDc3MWI3ZDM2Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTJmZTczYWRjOTlkMGM4ODQyODVlMDY2OTllZWIxZWJmNTM2Y2MwZDgzMWE2
|
10
|
+
ZmM4NjRhNTIwMjRkZGY1ZjkyMjhmMDUzYjAxMGMxNzE3YmE3ODY3OGY2ZTNm
|
11
|
+
OWVhOGQwMTY3MWJiNjUwMjlkOTQyOTRhNzg2YjY0ZTkwYjAxODM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWIyMmE3YzNhMWFjNjE4ZGQ5YWU4MDYxNDI3NzIzMTdlMjUxNzZkZWU0MzY4
|
14
|
+
MjhmOWY3NWE4OThmYzI3ZjEwODEyM2ViYzgxNDdkYjE0MWNlZGY1ZTdmN2Iz
|
15
|
+
NDNhOWQ3YmE4MmI5ZmY2MjBhNjk5MWIyNDBlYmE0ZThkM2NlMzE=
|
data/Gemfile
CHANGED
@@ -8,7 +8,7 @@ describe Acfs::Configuration do
|
|
8
8
|
|
9
9
|
describe 'Acfs.configure' do
|
10
10
|
it 'should invoke configure on current configuration' do
|
11
|
-
Acfs::Configuration.current.
|
11
|
+
expect(Acfs::Configuration.current).to receive(:configure).once.and_call_original
|
12
12
|
|
13
13
|
Acfs.configure do |c|
|
14
14
|
expect(c).to be_a Acfs::Configuration
|
@@ -53,7 +53,7 @@ describe Acfs::Model::Attributes do
|
|
53
53
|
it 'should do nothing on non-array types' do
|
54
54
|
ret = m.write_attributes 'James'
|
55
55
|
|
56
|
-
expect(ret).to
|
56
|
+
expect(ret).to be false
|
57
57
|
expect(m.attributes).to be == { name: 'John', age: 25 }.stringify_keys
|
58
58
|
end
|
59
59
|
end
|
@@ -208,8 +208,8 @@ describe Acfs::Model::Persistence do
|
|
208
208
|
let(:data) { { age: 12 } }
|
209
209
|
|
210
210
|
it 'should raise an error' do
|
211
|
-
expect { model_class.create! data }.to raise_error
|
212
|
-
expect(error.errors).to be == { name
|
211
|
+
expect { model_class.create! data }.to raise_error(::Acfs::InvalidResource) do |error|
|
212
|
+
expect(error.errors).to be == { 'name' => %w(required) }
|
213
213
|
end
|
214
214
|
end
|
215
215
|
end
|
@@ -20,7 +20,7 @@ describe Acfs::Model::QueryMethods do
|
|
20
20
|
|
21
21
|
it 'should invoke callback after model is loaded' do
|
22
22
|
proc = Proc.new { }
|
23
|
-
proc.
|
23
|
+
expect(proc).to receive(:call) do |user|
|
24
24
|
expect(user).to equal @user
|
25
25
|
expect(user).to be_loaded
|
26
26
|
end
|
@@ -94,7 +94,7 @@ describe Acfs::Model::QueryMethods do
|
|
94
94
|
|
95
95
|
it 'should invoke callback after all models are loaded' do
|
96
96
|
proc = Proc.new { }
|
97
|
-
proc.
|
97
|
+
expect(proc).to receive(:call) do |users|
|
98
98
|
expect(users).to be === @users
|
99
99
|
expect(users.size).to be == 2
|
100
100
|
expect(users).to be_loaded
|
@@ -79,7 +79,7 @@ describe Acfs::Model::Validation do
|
|
79
79
|
|
80
80
|
describe '#save!' do
|
81
81
|
subject { -> { model.save! } }
|
82
|
-
before { model.
|
82
|
+
before { allow(model).to receive(:operation) }
|
83
83
|
|
84
84
|
context 'with invalid attributes' do
|
85
85
|
let(:params) { {name: 'john'} }
|
@@ -25,7 +25,7 @@ describe Acfs::Request::Callbacks do
|
|
25
25
|
let(:response) { Acfs::Response.new(request) }
|
26
26
|
|
27
27
|
it 'should trigger registered callbacks with given response' do
|
28
|
-
callback.
|
28
|
+
expect(callback).to receive(:call).with(response, kind_of(Proc))
|
29
29
|
|
30
30
|
request.on_complete &callback
|
31
31
|
request.complete! response
|
@@ -25,7 +25,7 @@ describe Acfs::Service::Middleware do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'should instantiate middleware object' do
|
28
|
-
middleware.
|
28
|
+
expect(middleware).to receive(:new).with(anything, options)
|
29
29
|
|
30
30
|
srv_class.use middleware, options
|
31
31
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -26,10 +26,8 @@ RSpec.configure do |config|
|
|
26
26
|
# --seed 1234
|
27
27
|
config.order = 'random'
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
c.syntax = :expect
|
32
|
-
end
|
29
|
+
# Raise error when using old :should expectation syntax.
|
30
|
+
config.raise_errors_for_deprecations!
|
33
31
|
|
34
32
|
config.before :each do
|
35
33
|
Acfs.runner.clear
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.0.1.
|
4
|
+
version: 0.25.0.1.b228
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|