remockable 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +6 -0
- data/README.markdown +1 -0
- data/gemfiles/rails_4.2.gemfile.lock +12 -14
- data/gemfiles/rails_5.0.gemfile.lock +13 -13
- data/lib/remockable/active_model/allow_values_for.rb +9 -2
- data/lib/remockable/active_record/have_column.rb +1 -3
- data/lib/remockable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3c46052a1d6a43ebacbee804d92a1c3230f1031
|
4
|
+
data.tar.gz: 5414cdc33c8f3eac54883961fcaff365b433474b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e559bb3341b16f1c25c71a6bc55362ed88297f8979530a5b20170c90436e8372adf067442be48dc762049ac16fe530afa66226775a8681326e952ef968ca5fe2
|
7
|
+
data.tar.gz: 7077666f3324e348e9214cc43e73303786dcc2e0ea3bb3908ad5cfb738efaf8b8c3979c6d9bdfb511caea5ea3c1eedfe5f023c8e76820afa4dea370f5714300f
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.3.4 (2017-04-20)
|
4
|
+
|
5
|
+
* Fix `allow_values_for` matcher ([Tyler Hunt][tylerhunt])
|
6
|
+
* Update `allow_values_for` to use the setter on the object if defined
|
7
|
+
([Tyler Hunt][tylerhunt])
|
8
|
+
|
3
9
|
## 0.3.3 (2017-01-16)
|
4
10
|
|
5
11
|
* Add `:required`/`:optional` to `belong_to` ([Tyler Hunt][tylerhunt])
|
data/README.markdown
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
remockable (0.3.
|
4
|
+
remockable (0.3.4)
|
5
5
|
activemodel (>= 4.0, < 5.1)
|
6
6
|
activerecord (>= 4.0, < 5.1)
|
7
7
|
activesupport (>= 4.0, < 5.1)
|
@@ -12,28 +12,26 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activemodel (4.2.
|
16
|
-
activesupport (= 4.2.
|
15
|
+
activemodel (4.2.8)
|
16
|
+
activesupport (= 4.2.8)
|
17
17
|
builder (~> 3.1)
|
18
|
-
activerecord (4.2.
|
19
|
-
activemodel (= 4.2.
|
20
|
-
activesupport (= 4.2.
|
18
|
+
activerecord (4.2.8)
|
19
|
+
activemodel (= 4.2.8)
|
20
|
+
activesupport (= 4.2.8)
|
21
21
|
arel (~> 6.0)
|
22
|
-
activesupport (4.2.
|
22
|
+
activesupport (4.2.8)
|
23
23
|
i18n (~> 0.7)
|
24
|
-
json (~> 1.7, >= 1.7.7)
|
25
24
|
minitest (~> 5.1)
|
26
25
|
thread_safe (~> 0.3, >= 0.3.4)
|
27
26
|
tzinfo (~> 1.1)
|
28
|
-
appraisal (2.
|
27
|
+
appraisal (2.2.0)
|
29
28
|
bundler
|
30
29
|
rake
|
31
30
|
thor (>= 0.14.0)
|
32
31
|
arel (6.0.4)
|
33
32
|
builder (3.2.3)
|
34
|
-
diff-lcs (1.
|
35
|
-
i18n (0.
|
36
|
-
json (1.8.6)
|
33
|
+
diff-lcs (1.3)
|
34
|
+
i18n (0.8.1)
|
37
35
|
minitest (5.10.1)
|
38
36
|
rake (12.0.0)
|
39
37
|
rspec-core (3.5.4)
|
@@ -47,8 +45,8 @@ GEM
|
|
47
45
|
rspec-support (3.5.0)
|
48
46
|
sqlite3 (1.3.13)
|
49
47
|
thor (0.19.4)
|
50
|
-
thread_safe (0.3.
|
51
|
-
tzinfo (1.2.
|
48
|
+
thread_safe (0.3.6)
|
49
|
+
tzinfo (1.2.3)
|
52
50
|
thread_safe (~> 0.1)
|
53
51
|
|
54
52
|
PLATFORMS
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
remockable (0.3.
|
4
|
+
remockable (0.3.4)
|
5
5
|
activemodel (>= 4.0, < 5.1)
|
6
6
|
activerecord (>= 4.0, < 5.1)
|
7
7
|
activesupport (>= 4.0, < 5.1)
|
@@ -12,25 +12,25 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activemodel (5.0.
|
16
|
-
activesupport (= 5.0.
|
17
|
-
activerecord (5.0.
|
18
|
-
activemodel (= 5.0.
|
19
|
-
activesupport (= 5.0.
|
15
|
+
activemodel (5.0.2)
|
16
|
+
activesupport (= 5.0.2)
|
17
|
+
activerecord (5.0.2)
|
18
|
+
activemodel (= 5.0.2)
|
19
|
+
activesupport (= 5.0.2)
|
20
20
|
arel (~> 7.0)
|
21
|
-
activesupport (5.0.
|
21
|
+
activesupport (5.0.2)
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
23
|
i18n (~> 0.7)
|
24
24
|
minitest (~> 5.1)
|
25
25
|
tzinfo (~> 1.1)
|
26
|
-
appraisal (2.
|
26
|
+
appraisal (2.2.0)
|
27
27
|
bundler
|
28
28
|
rake
|
29
29
|
thor (>= 0.14.0)
|
30
30
|
arel (7.1.4)
|
31
|
-
concurrent-ruby (1.0.
|
32
|
-
diff-lcs (1.
|
33
|
-
i18n (0.
|
31
|
+
concurrent-ruby (1.0.5)
|
32
|
+
diff-lcs (1.3)
|
33
|
+
i18n (0.8.1)
|
34
34
|
minitest (5.10.1)
|
35
35
|
rake (12.0.0)
|
36
36
|
rspec-core (3.5.4)
|
@@ -44,8 +44,8 @@ GEM
|
|
44
44
|
rspec-support (3.5.0)
|
45
45
|
sqlite3 (1.3.13)
|
46
46
|
thor (0.19.4)
|
47
|
-
thread_safe (0.3.
|
48
|
-
tzinfo (1.2.
|
47
|
+
thread_safe (0.3.6)
|
48
|
+
tzinfo (1.2.3)
|
49
49
|
thread_safe (~> 0.1)
|
50
50
|
|
51
51
|
PLATFORMS
|
@@ -1,11 +1,18 @@
|
|
1
|
-
RSpec::Matchers.define(:allow_values_for) do
|
1
|
+
RSpec::Matchers.define(:allow_values_for) do
|
2
|
+
include Remockable::ActiveModel::Helpers
|
3
|
+
|
2
4
|
def values
|
3
5
|
expected_as_array[1..-1]
|
4
6
|
end
|
5
7
|
|
6
8
|
match do |actual|
|
7
9
|
values.all? do |value|
|
8
|
-
|
10
|
+
if subject.respond_to?(:"#{attribute}=")
|
11
|
+
subject.send(:"#{attribute}=", value)
|
12
|
+
else
|
13
|
+
allow(subject).to receive(attribute).and_return(value)
|
14
|
+
end
|
15
|
+
|
9
16
|
subject.valid?
|
10
17
|
subject.errors[attribute].empty?
|
11
18
|
end
|
@@ -4,9 +4,7 @@ RSpec::Matchers.define(:have_column) do
|
|
4
4
|
valid_options %w(default limit null precision scale type)
|
5
5
|
|
6
6
|
def column
|
7
|
-
@column ||= subject.class.
|
8
|
-
column.name == attribute.to_s
|
9
|
-
}
|
7
|
+
@column ||= subject.class.columns_hash[attribute.to_s]
|
10
8
|
end
|
11
9
|
|
12
10
|
match do |actual|
|
data/lib/remockable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remockable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Hunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
248
|
rubyforge_project:
|
249
|
-
rubygems_version: 2.
|
249
|
+
rubygems_version: 2.6.8
|
250
250
|
signing_key:
|
251
251
|
specification_version: 4
|
252
252
|
summary: A collection of RSpec matchers for web apps.
|