remockable 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +39 -14
- data/Appraisals +22 -15
- data/CHANGELOG.md +6 -1
- data/gemfiles/rails_4.2.gemfile +4 -4
- data/gemfiles/rails_4.2.gemfile.lock +31 -29
- data/gemfiles/rails_5.0.gemfile +5 -4
- data/gemfiles/rails_5.0.gemfile.lock +32 -31
- data/gemfiles/rails_5.1.gemfile +4 -4
- data/gemfiles/rails_5.1.gemfile.lock +33 -32
- data/gemfiles/rails_5.2.gemfile +4 -4
- data/gemfiles/rails_5.2.gemfile.lock +31 -31
- data/gemfiles/rails_6.0.gemfile +9 -0
- data/gemfiles/rails_6.0.gemfile.lock +65 -0
- data/gemfiles/rails_6.1.gemfile +9 -0
- data/gemfiles/rails_6.1.gemfile.lock +64 -0
- data/lib/remockable/version.rb +1 -1
- data/remockable.gemspec +4 -4
- data/spec/active_model/allow_values_for_spec.rb +7 -1
- data/spec/active_record/belong_to_spec.rb +1 -1
- data/spec/active_record/have_many_spec.rb +2 -2
- data/spec/support/class_builder.rb +1 -1
- data/spec/support/shared/a_validation_matcher.rb +7 -1
- data/spec/support/shared/an_active_record_matcher.rb +9 -3
- metadata +15 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d522b220b5d639c5cd9285a9a8f5159453ffe89f2939c8bc027e031912df157
|
4
|
+
data.tar.gz: 785fb2bf78e0bcab7a199c9e9818ba76e280205adad1447a2a04dc484780da76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7dc58ccf2dfa5dfc0e8f1a50afe59aad5bc5e35c3c6d77d0056a6662ac44454cd1dbc69a614a460ef9620607c7c86633d39778ead1551440e8a416056f2e0f9
|
7
|
+
data.tar.gz: 978f77d8ba97d08df0b37776488f5280411647d838467ec36b9bb628ca8cdb8ef71ca64eb07cff91b6190a45949ba29887a32d1418d3be8afa39d09c6fe495a9
|
data/.travis.yml
CHANGED
@@ -1,32 +1,57 @@
|
|
1
1
|
language: ruby
|
2
2
|
cache: bundler
|
3
|
+
before_install: gem install bundler:2.1.4
|
3
4
|
script: bundle exec rspec
|
4
5
|
sudo: false
|
5
6
|
|
6
7
|
gemfile:
|
7
|
-
- gemfiles/rails_4.2.gemfile
|
8
8
|
- gemfiles/rails_5.0.gemfile
|
9
9
|
- gemfiles/rails_5.1.gemfile
|
10
10
|
- gemfiles/rails_5.2.gemfile
|
11
|
+
- gemfiles/rails_6.0.gemfile
|
12
|
+
- gemfiles/rails_6.1.gemfile
|
11
13
|
|
12
14
|
rvm:
|
13
|
-
- 2.
|
14
|
-
- 2.
|
15
|
-
- 2.
|
16
|
-
- 2.
|
17
|
-
- 2.
|
15
|
+
- 2.3.8
|
16
|
+
- 2.4.10
|
17
|
+
- 2.5.8
|
18
|
+
- 2.6.6
|
19
|
+
- 2.7.2
|
20
|
+
- 3.0.0
|
18
21
|
|
19
22
|
matrix:
|
20
23
|
exclude:
|
21
|
-
- rvm: 2.
|
24
|
+
- rvm: 2.5.8
|
22
25
|
gemfile: gemfiles/rails_5.0.gemfile
|
23
|
-
- rvm: 2.
|
24
|
-
gemfile: gemfiles/rails_5.
|
25
|
-
- rvm: 2.
|
26
|
-
gemfile: gemfiles/rails_5.2.gemfile
|
27
|
-
- rvm: 2.1.10
|
26
|
+
- rvm: 2.6.6
|
27
|
+
gemfile: gemfiles/rails_5.0.gemfile
|
28
|
+
- rvm: 2.7.2
|
28
29
|
gemfile: gemfiles/rails_5.0.gemfile
|
29
|
-
- rvm:
|
30
|
+
- rvm: 3.0.0
|
31
|
+
gemfile: gemfiles/rails_5.0.gemfile
|
32
|
+
|
33
|
+
- rvm: 2.6.6
|
34
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
35
|
+
- rvm: 2.7.2
|
30
36
|
gemfile: gemfiles/rails_5.1.gemfile
|
31
|
-
- rvm:
|
37
|
+
- rvm: 3.0.0
|
38
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
39
|
+
|
40
|
+
- rvm: 2.6.6
|
41
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
42
|
+
- rvm: 2.7.2
|
32
43
|
gemfile: gemfiles/rails_5.2.gemfile
|
44
|
+
- rvm: 3.0.0
|
45
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
46
|
+
|
47
|
+
- rvm: 2.3.8
|
48
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
49
|
+
- rvm: 2.4.10
|
50
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
51
|
+
- rvm: 3.0.0
|
52
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
53
|
+
|
54
|
+
- rvm: 2.3.8
|
55
|
+
gemfile: gemfiles/rails_6.1.gemfile
|
56
|
+
- rvm: 2.4.10
|
57
|
+
gemfile: gemfiles/rails_6.1.gemfile
|
data/Appraisals
CHANGED
@@ -1,23 +1,30 @@
|
|
1
|
-
appraise 'rails-4.2' do
|
2
|
-
gem 'activemodel', '~> 4.2'
|
3
|
-
gem 'activerecord', '~> 4.2'
|
4
|
-
gem 'activesupport', '~> 4.2'
|
5
|
-
end
|
6
|
-
|
7
1
|
appraise 'rails-5.0' do
|
8
|
-
gem 'activemodel', '~> 5.0'
|
9
|
-
gem 'activerecord', '~> 5.0'
|
10
|
-
gem 'activesupport', '~> 5.0'
|
2
|
+
gem 'activemodel', '~> 5.0.0'
|
3
|
+
gem 'activerecord', '~> 5.0.0'
|
4
|
+
gem 'activesupport', '~> 5.0.0'
|
5
|
+
gem 'sqlite3', '~> 1.3.6'
|
11
6
|
end
|
12
7
|
|
13
8
|
appraise 'rails-5.1' do
|
14
|
-
gem 'activemodel', '~> 5.1'
|
15
|
-
gem 'activerecord', '~> 5.1'
|
16
|
-
gem 'activesupport', '~> 5.1'
|
9
|
+
gem 'activemodel', '~> 5.1.0'
|
10
|
+
gem 'activerecord', '~> 5.1.0'
|
11
|
+
gem 'activesupport', '~> 5.1.0'
|
17
12
|
end
|
18
13
|
|
19
14
|
appraise 'rails-5.2' do
|
20
|
-
gem 'activemodel', '~> 5.2'
|
21
|
-
gem 'activerecord', '~> 5.2'
|
22
|
-
gem 'activesupport', '~> 5.2'
|
15
|
+
gem 'activemodel', '~> 5.2.0'
|
16
|
+
gem 'activerecord', '~> 5.2.0'
|
17
|
+
gem 'activesupport', '~> 5.2.0'
|
18
|
+
end
|
19
|
+
|
20
|
+
appraise 'rails-6.0' do
|
21
|
+
gem 'activemodel', '~> 6.0.0'
|
22
|
+
gem 'activerecord', '~> 6.0.0'
|
23
|
+
gem 'activesupport', '~> 6.0.0'
|
24
|
+
end
|
25
|
+
|
26
|
+
appraise 'rails-6.1' do
|
27
|
+
gem 'activemodel', '~> 6.1.0'
|
28
|
+
gem 'activerecord', '~> 6.1.0'
|
29
|
+
gem 'activesupport', '~> 6.1.0'
|
23
30
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.3.7 (2021-01-12)
|
4
|
+
|
5
|
+
* Support Rails 6.0, 6.1 ([AGuyNamedRyan][])
|
6
|
+
|
3
7
|
## 0.3.6 (2018-05-07)
|
4
8
|
|
5
9
|
* Support Rails 5.2 ([Tyler Hunt][tylerhunt])
|
@@ -115,7 +119,8 @@
|
|
115
119
|
|
116
120
|
* Initial release ([Tyler Hunt][tylerhunt])
|
117
121
|
|
122
|
+
[aguynamedryan]: https://github.com/aguynamedryan
|
118
123
|
[jswanner]: https://github.com/jswanner
|
124
|
+
[nbibler]: https://github.com/nbibler
|
119
125
|
[olivierlacan]: https://github.com/olivierlacan
|
120
126
|
[tylerhunt]: https://github.com/tylerhunt
|
121
|
-
[nbibler]: https://github.com/nbibler
|
data/gemfiles/rails_4.2.gemfile
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org/"
|
4
4
|
|
5
|
-
gem "activemodel", "~> 4.2"
|
6
|
-
gem "activerecord", "~> 4.2"
|
7
|
-
gem "activesupport", "~> 4.2"
|
5
|
+
gem "activemodel", "~> 4.2.0"
|
6
|
+
gem "activerecord", "~> 4.2.0"
|
7
|
+
gem "activesupport", "~> 4.2.0"
|
8
8
|
|
9
|
-
gemspec :
|
9
|
+
gemspec path: "../"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
remockable (0.3.
|
5
|
-
activemodel (>= 4.0, <
|
6
|
-
activerecord (>= 4.0, <
|
7
|
-
activesupport (>= 4.0, <
|
4
|
+
remockable (0.3.6)
|
5
|
+
activemodel (>= 4.0, < 6.2)
|
6
|
+
activerecord (>= 4.0, < 6.2)
|
7
|
+
activesupport (>= 4.0, < 6.2)
|
8
8
|
rspec-core (~> 3.0)
|
9
9
|
rspec-expectations (~> 3.0)
|
10
10
|
rspec-mocks (~> 3.0)
|
@@ -12,54 +12,56 @@ 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.11.3)
|
16
|
+
activesupport (= 4.2.11.3)
|
17
17
|
builder (~> 3.1)
|
18
|
-
activerecord (4.2.
|
19
|
-
activemodel (= 4.2.
|
20
|
-
activesupport (= 4.2.
|
18
|
+
activerecord (4.2.11.3)
|
19
|
+
activemodel (= 4.2.11.3)
|
20
|
+
activesupport (= 4.2.11.3)
|
21
21
|
arel (~> 6.0)
|
22
|
-
activesupport (4.2.
|
22
|
+
activesupport (4.2.11.3)
|
23
23
|
i18n (~> 0.7)
|
24
24
|
minitest (~> 5.1)
|
25
25
|
thread_safe (~> 0.3, >= 0.3.4)
|
26
26
|
tzinfo (~> 1.1)
|
27
|
-
appraisal (2.
|
27
|
+
appraisal (2.3.0)
|
28
28
|
bundler
|
29
29
|
rake
|
30
30
|
thor (>= 0.14.0)
|
31
31
|
arel (6.0.4)
|
32
|
-
builder (3.2.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
rspec-
|
32
|
+
builder (3.2.4)
|
33
|
+
concurrent-ruby (1.1.7)
|
34
|
+
diff-lcs (1.4.4)
|
35
|
+
i18n (0.9.5)
|
36
|
+
concurrent-ruby (~> 1.0)
|
37
|
+
minitest (5.14.3)
|
38
|
+
rake (13.0.3)
|
39
|
+
rspec-core (3.10.1)
|
40
|
+
rspec-support (~> 3.10.0)
|
41
|
+
rspec-expectations (3.10.1)
|
40
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
43
|
+
rspec-support (~> 3.10.0)
|
44
|
+
rspec-mocks (3.10.1)
|
43
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
+
rspec-support (~> 3.10.0)
|
47
|
+
rspec-support (3.10.1)
|
46
48
|
sqlite3 (1.3.13)
|
47
|
-
thor (0.
|
49
|
+
thor (1.0.1)
|
48
50
|
thread_safe (0.3.6)
|
49
|
-
tzinfo (1.2.
|
51
|
+
tzinfo (1.2.9)
|
50
52
|
thread_safe (~> 0.1)
|
51
53
|
|
52
54
|
PLATFORMS
|
53
55
|
ruby
|
54
56
|
|
55
57
|
DEPENDENCIES
|
56
|
-
activemodel (~> 4.2)
|
57
|
-
activerecord (~> 4.2)
|
58
|
-
activesupport (~> 4.2)
|
58
|
+
activemodel (~> 4.2.0)
|
59
|
+
activerecord (~> 4.2.0)
|
60
|
+
activesupport (~> 4.2.0)
|
59
61
|
appraisal (~> 2.1)
|
60
62
|
rake
|
61
63
|
remockable!
|
62
64
|
sqlite3 (~> 1.3.4)
|
63
65
|
|
64
66
|
BUNDLED WITH
|
65
|
-
1.
|
67
|
+
2.1.4
|
data/gemfiles/rails_5.0.gemfile
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org/"
|
4
4
|
|
5
|
-
gem "activemodel", "~> 5.0"
|
6
|
-
gem "activerecord", "~> 5.0"
|
7
|
-
gem "activesupport", "~> 5.0"
|
5
|
+
gem "activemodel", "~> 5.0.0"
|
6
|
+
gem "activerecord", "~> 5.0.0"
|
7
|
+
gem "activesupport", "~> 5.0.0"
|
8
|
+
gem "sqlite3", "~> 1.3.6"
|
8
9
|
|
9
|
-
gemspec :
|
10
|
+
gemspec path: "../"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
remockable (0.3.
|
5
|
-
activemodel (>= 4.0, <
|
6
|
-
activerecord (>= 4.0, <
|
7
|
-
activesupport (>= 4.0, <
|
4
|
+
remockable (0.3.7)
|
5
|
+
activemodel (>= 4.0, < 6.2)
|
6
|
+
activerecord (>= 4.0, < 6.2)
|
7
|
+
activesupport (>= 4.0, < 6.2)
|
8
8
|
rspec-core (~> 3.0)
|
9
9
|
rspec-expectations (~> 3.0)
|
10
10
|
rspec-mocks (~> 3.0)
|
@@ -12,53 +12,54 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
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)
|
15
|
+
activemodel (5.0.7.2)
|
16
|
+
activesupport (= 5.0.7.2)
|
17
|
+
activerecord (5.0.7.2)
|
18
|
+
activemodel (= 5.0.7.2)
|
19
|
+
activesupport (= 5.0.7.2)
|
20
20
|
arel (~> 7.0)
|
21
|
-
activesupport (5.0.2)
|
21
|
+
activesupport (5.0.7.2)
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
|
-
i18n (
|
23
|
+
i18n (>= 0.7, < 2)
|
24
24
|
minitest (~> 5.1)
|
25
25
|
tzinfo (~> 1.1)
|
26
|
-
appraisal (2.
|
26
|
+
appraisal (2.3.0)
|
27
27
|
bundler
|
28
28
|
rake
|
29
29
|
thor (>= 0.14.0)
|
30
30
|
arel (7.1.4)
|
31
|
-
concurrent-ruby (1.
|
32
|
-
diff-lcs (1.
|
33
|
-
i18n (
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
31
|
+
concurrent-ruby (1.1.7)
|
32
|
+
diff-lcs (1.4.4)
|
33
|
+
i18n (1.8.7)
|
34
|
+
concurrent-ruby (~> 1.0)
|
35
|
+
minitest (5.14.3)
|
36
|
+
rake (13.0.3)
|
37
|
+
rspec-core (3.10.1)
|
38
|
+
rspec-support (~> 3.10.0)
|
39
|
+
rspec-expectations (3.10.1)
|
39
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.10.0)
|
42
|
+
rspec-mocks (3.10.1)
|
42
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-support (3.10.1)
|
45
46
|
sqlite3 (1.3.13)
|
46
|
-
thor (0.
|
47
|
+
thor (1.0.1)
|
47
48
|
thread_safe (0.3.6)
|
48
|
-
tzinfo (1.2.
|
49
|
+
tzinfo (1.2.9)
|
49
50
|
thread_safe (~> 0.1)
|
50
51
|
|
51
52
|
PLATFORMS
|
52
53
|
ruby
|
53
54
|
|
54
55
|
DEPENDENCIES
|
55
|
-
activemodel (~> 5.0)
|
56
|
-
activerecord (~> 5.0)
|
57
|
-
activesupport (~> 5.0)
|
56
|
+
activemodel (~> 5.0.0)
|
57
|
+
activerecord (~> 5.0.0)
|
58
|
+
activesupport (~> 5.0.0)
|
58
59
|
appraisal (~> 2.1)
|
59
60
|
rake
|
60
61
|
remockable!
|
61
|
-
sqlite3 (~> 1.3.
|
62
|
+
sqlite3 (~> 1.3.6)
|
62
63
|
|
63
64
|
BUNDLED WITH
|
64
|
-
1.
|
65
|
+
2.1.4
|
data/gemfiles/rails_5.1.gemfile
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org/"
|
4
4
|
|
5
|
-
gem "activemodel", "~> 5.1"
|
6
|
-
gem "activerecord", "~> 5.1"
|
7
|
-
gem "activesupport", "~> 5.1"
|
5
|
+
gem "activemodel", "~> 5.1.0"
|
6
|
+
gem "activerecord", "~> 5.1.0"
|
7
|
+
gem "activesupport", "~> 5.1.0"
|
8
8
|
|
9
|
-
gemspec :
|
9
|
+
gemspec path: "../"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
remockable (0.3.
|
5
|
-
activemodel (>= 4.0, <
|
6
|
-
activerecord (>= 4.0, <
|
7
|
-
activesupport (>= 4.0, <
|
4
|
+
remockable (0.3.7)
|
5
|
+
activemodel (>= 4.0, < 6.2)
|
6
|
+
activerecord (>= 4.0, < 6.2)
|
7
|
+
activesupport (>= 4.0, < 6.2)
|
8
8
|
rspec-core (~> 3.0)
|
9
9
|
rspec-expectations (~> 3.0)
|
10
10
|
rspec-mocks (~> 3.0)
|
@@ -12,53 +12,54 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activemodel (5.1.
|
16
|
-
activesupport (= 5.1.
|
17
|
-
activerecord (5.1.
|
18
|
-
activemodel (= 5.1.
|
19
|
-
activesupport (= 5.1.
|
15
|
+
activemodel (5.1.7)
|
16
|
+
activesupport (= 5.1.7)
|
17
|
+
activerecord (5.1.7)
|
18
|
+
activemodel (= 5.1.7)
|
19
|
+
activesupport (= 5.1.7)
|
20
20
|
arel (~> 8.0)
|
21
|
-
activesupport (5.1.
|
21
|
+
activesupport (5.1.7)
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
|
-
i18n (
|
23
|
+
i18n (>= 0.7, < 2)
|
24
24
|
minitest (~> 5.1)
|
25
25
|
tzinfo (~> 1.1)
|
26
|
-
appraisal (2.
|
26
|
+
appraisal (2.3.0)
|
27
27
|
bundler
|
28
28
|
rake
|
29
29
|
thor (>= 0.14.0)
|
30
30
|
arel (8.0.0)
|
31
|
-
concurrent-ruby (1.
|
32
|
-
diff-lcs (1.
|
33
|
-
i18n (
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
31
|
+
concurrent-ruby (1.1.7)
|
32
|
+
diff-lcs (1.4.4)
|
33
|
+
i18n (1.8.7)
|
34
|
+
concurrent-ruby (~> 1.0)
|
35
|
+
minitest (5.14.3)
|
36
|
+
rake (13.0.3)
|
37
|
+
rspec-core (3.10.1)
|
38
|
+
rspec-support (~> 3.10.0)
|
39
|
+
rspec-expectations (3.10.1)
|
39
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
-
rspec-support (~> 3.
|
41
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.10.0)
|
42
|
+
rspec-mocks (3.10.1)
|
42
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-support (3.
|
45
|
-
sqlite3 (1.
|
46
|
-
thor (0.
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-support (3.10.1)
|
46
|
+
sqlite3 (1.4.2)
|
47
|
+
thor (1.0.1)
|
47
48
|
thread_safe (0.3.6)
|
48
|
-
tzinfo (1.2.
|
49
|
+
tzinfo (1.2.9)
|
49
50
|
thread_safe (~> 0.1)
|
50
51
|
|
51
52
|
PLATFORMS
|
52
53
|
ruby
|
53
54
|
|
54
55
|
DEPENDENCIES
|
55
|
-
activemodel (~> 5.1)
|
56
|
-
activerecord (~> 5.1)
|
57
|
-
activesupport (~> 5.1)
|
56
|
+
activemodel (~> 5.1.0)
|
57
|
+
activerecord (~> 5.1.0)
|
58
|
+
activesupport (~> 5.1.0)
|
58
59
|
appraisal (~> 2.1)
|
59
60
|
rake
|
60
61
|
remockable!
|
61
|
-
sqlite3 (~> 1.
|
62
|
+
sqlite3 (~> 1.4.2)
|
62
63
|
|
63
64
|
BUNDLED WITH
|
64
|
-
1.
|
65
|
+
2.1.4
|
data/gemfiles/rails_5.2.gemfile
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org/"
|
4
4
|
|
5
|
-
gem "activemodel", "~> 5.2"
|
6
|
-
gem "activerecord", "~> 5.2"
|
7
|
-
gem "activesupport", "~> 5.2"
|
5
|
+
gem "activemodel", "~> 5.2.0"
|
6
|
+
gem "activerecord", "~> 5.2.0"
|
7
|
+
gem "activesupport", "~> 5.2.0"
|
8
8
|
|
9
|
-
gemspec :
|
9
|
+
gemspec path: "../"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
remockable (0.3.
|
5
|
-
activemodel (>= 4.0, <
|
6
|
-
activerecord (>= 4.0, <
|
7
|
-
activesupport (>= 4.0, <
|
4
|
+
remockable (0.3.7)
|
5
|
+
activemodel (>= 4.0, < 6.2)
|
6
|
+
activerecord (>= 4.0, < 6.2)
|
7
|
+
activesupport (>= 4.0, < 6.2)
|
8
8
|
rspec-core (~> 3.0)
|
9
9
|
rspec-expectations (~> 3.0)
|
10
10
|
rspec-mocks (~> 3.0)
|
@@ -12,54 +12,54 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activemodel (5.2.
|
16
|
-
activesupport (= 5.2.
|
17
|
-
activerecord (5.2.
|
18
|
-
activemodel (= 5.2.
|
19
|
-
activesupport (= 5.2.
|
15
|
+
activemodel (5.2.4.4)
|
16
|
+
activesupport (= 5.2.4.4)
|
17
|
+
activerecord (5.2.4.4)
|
18
|
+
activemodel (= 5.2.4.4)
|
19
|
+
activesupport (= 5.2.4.4)
|
20
20
|
arel (>= 9.0)
|
21
|
-
activesupport (5.2.
|
21
|
+
activesupport (5.2.4.4)
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
23
|
i18n (>= 0.7, < 2)
|
24
24
|
minitest (~> 5.1)
|
25
25
|
tzinfo (~> 1.1)
|
26
|
-
appraisal (2.
|
26
|
+
appraisal (2.3.0)
|
27
27
|
bundler
|
28
28
|
rake
|
29
29
|
thor (>= 0.14.0)
|
30
30
|
arel (9.0.0)
|
31
|
-
concurrent-ruby (1.
|
32
|
-
diff-lcs (1.
|
33
|
-
i18n (1.
|
31
|
+
concurrent-ruby (1.1.7)
|
32
|
+
diff-lcs (1.4.4)
|
33
|
+
i18n (1.8.7)
|
34
34
|
concurrent-ruby (~> 1.0)
|
35
|
-
minitest (5.
|
36
|
-
rake (
|
37
|
-
rspec-core (3.
|
38
|
-
rspec-support (~> 3.
|
39
|
-
rspec-expectations (3.
|
35
|
+
minitest (5.14.3)
|
36
|
+
rake (13.0.3)
|
37
|
+
rspec-core (3.10.1)
|
38
|
+
rspec-support (~> 3.10.0)
|
39
|
+
rspec-expectations (3.10.1)
|
40
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.10.0)
|
42
|
+
rspec-mocks (3.10.1)
|
43
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
-
sqlite3 (1.
|
47
|
-
thor (0.
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-support (3.10.1)
|
46
|
+
sqlite3 (1.4.2)
|
47
|
+
thor (1.0.1)
|
48
48
|
thread_safe (0.3.6)
|
49
|
-
tzinfo (1.2.
|
49
|
+
tzinfo (1.2.9)
|
50
50
|
thread_safe (~> 0.1)
|
51
51
|
|
52
52
|
PLATFORMS
|
53
53
|
ruby
|
54
54
|
|
55
55
|
DEPENDENCIES
|
56
|
-
activemodel (~> 5.2)
|
57
|
-
activerecord (~> 5.2)
|
58
|
-
activesupport (~> 5.2)
|
56
|
+
activemodel (~> 5.2.0)
|
57
|
+
activerecord (~> 5.2.0)
|
58
|
+
activesupport (~> 5.2.0)
|
59
59
|
appraisal (~> 2.1)
|
60
60
|
rake
|
61
61
|
remockable!
|
62
|
-
sqlite3 (~> 1.
|
62
|
+
sqlite3 (~> 1.4.2)
|
63
63
|
|
64
64
|
BUNDLED WITH
|
65
|
-
1.
|
65
|
+
2.1.4
|
@@ -0,0 +1,65 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
remockable (0.3.7)
|
5
|
+
activemodel (>= 4.0, < 6.2)
|
6
|
+
activerecord (>= 4.0, < 6.2)
|
7
|
+
activesupport (>= 4.0, < 6.2)
|
8
|
+
rspec-core (~> 3.0)
|
9
|
+
rspec-expectations (~> 3.0)
|
10
|
+
rspec-mocks (~> 3.0)
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
activemodel (6.0.3.4)
|
16
|
+
activesupport (= 6.0.3.4)
|
17
|
+
activerecord (6.0.3.4)
|
18
|
+
activemodel (= 6.0.3.4)
|
19
|
+
activesupport (= 6.0.3.4)
|
20
|
+
activesupport (6.0.3.4)
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
+
i18n (>= 0.7, < 2)
|
23
|
+
minitest (~> 5.1)
|
24
|
+
tzinfo (~> 1.1)
|
25
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
26
|
+
appraisal (2.3.0)
|
27
|
+
bundler
|
28
|
+
rake
|
29
|
+
thor (>= 0.14.0)
|
30
|
+
concurrent-ruby (1.1.7)
|
31
|
+
diff-lcs (1.4.4)
|
32
|
+
i18n (1.8.7)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
|
+
minitest (5.14.3)
|
35
|
+
rake (13.0.3)
|
36
|
+
rspec-core (3.10.1)
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-expectations (3.10.1)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.10.0)
|
41
|
+
rspec-mocks (3.10.1)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.10.0)
|
44
|
+
rspec-support (3.10.1)
|
45
|
+
sqlite3 (1.4.2)
|
46
|
+
thor (1.0.1)
|
47
|
+
thread_safe (0.3.6)
|
48
|
+
tzinfo (1.2.9)
|
49
|
+
thread_safe (~> 0.1)
|
50
|
+
zeitwerk (2.4.2)
|
51
|
+
|
52
|
+
PLATFORMS
|
53
|
+
ruby
|
54
|
+
|
55
|
+
DEPENDENCIES
|
56
|
+
activemodel (~> 6.0.0)
|
57
|
+
activerecord (~> 6.0.0)
|
58
|
+
activesupport (~> 6.0.0)
|
59
|
+
appraisal (~> 2.1)
|
60
|
+
rake
|
61
|
+
remockable!
|
62
|
+
sqlite3 (~> 1.4.2)
|
63
|
+
|
64
|
+
BUNDLED WITH
|
65
|
+
2.1.4
|
@@ -0,0 +1,64 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
remockable (0.3.7)
|
5
|
+
activemodel (>= 4.0, < 6.2)
|
6
|
+
activerecord (>= 4.0, < 6.2)
|
7
|
+
activesupport (>= 4.0, < 6.2)
|
8
|
+
rspec-core (~> 3.0)
|
9
|
+
rspec-expectations (~> 3.0)
|
10
|
+
rspec-mocks (~> 3.0)
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
activemodel (6.1.1)
|
16
|
+
activesupport (= 6.1.1)
|
17
|
+
activerecord (6.1.1)
|
18
|
+
activemodel (= 6.1.1)
|
19
|
+
activesupport (= 6.1.1)
|
20
|
+
activesupport (6.1.1)
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
+
i18n (>= 1.6, < 2)
|
23
|
+
minitest (>= 5.1)
|
24
|
+
tzinfo (~> 2.0)
|
25
|
+
zeitwerk (~> 2.3)
|
26
|
+
appraisal (2.3.0)
|
27
|
+
bundler
|
28
|
+
rake
|
29
|
+
thor (>= 0.14.0)
|
30
|
+
concurrent-ruby (1.1.7)
|
31
|
+
diff-lcs (1.4.4)
|
32
|
+
i18n (1.8.7)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
|
+
minitest (5.14.3)
|
35
|
+
rake (13.0.3)
|
36
|
+
rspec-core (3.10.1)
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-expectations (3.10.1)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.10.0)
|
41
|
+
rspec-mocks (3.10.1)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.10.0)
|
44
|
+
rspec-support (3.10.1)
|
45
|
+
sqlite3 (1.4.2)
|
46
|
+
thor (1.0.1)
|
47
|
+
tzinfo (2.0.4)
|
48
|
+
concurrent-ruby (~> 1.0)
|
49
|
+
zeitwerk (2.4.2)
|
50
|
+
|
51
|
+
PLATFORMS
|
52
|
+
ruby
|
53
|
+
|
54
|
+
DEPENDENCIES
|
55
|
+
activemodel (~> 6.1.0)
|
56
|
+
activerecord (~> 6.1.0)
|
57
|
+
activesupport (~> 6.1.0)
|
58
|
+
appraisal (~> 2.1)
|
59
|
+
rake
|
60
|
+
remockable!
|
61
|
+
sqlite3 (~> 1.4.2)
|
62
|
+
|
63
|
+
BUNDLED WITH
|
64
|
+
2.1.4
|
data/lib/remockable/version.rb
CHANGED
data/remockable.gemspec
CHANGED
@@ -8,15 +8,15 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.homepage = 'http://github.com/tylerhunt/remockable'
|
9
9
|
spec.license = 'MIT'
|
10
10
|
|
11
|
-
spec.add_dependency 'activemodel', '>= 4.0', '<
|
12
|
-
spec.add_dependency 'activerecord', '>= 4.0', '<
|
13
|
-
spec.add_dependency 'activesupport', '>= 4.0', '<
|
11
|
+
spec.add_dependency 'activemodel', '>= 4.0', '< 6.2'
|
12
|
+
spec.add_dependency 'activerecord', '>= 4.0', '< 6.2'
|
13
|
+
spec.add_dependency 'activesupport', '>= 4.0', '< 6.2'
|
14
14
|
spec.add_dependency 'rspec-core', '~> 3.0'
|
15
15
|
spec.add_dependency 'rspec-expectations', '~> 3.0'
|
16
16
|
spec.add_dependency 'rspec-mocks', '~> 3.0'
|
17
17
|
spec.add_development_dependency 'appraisal', '~> 2.1'
|
18
18
|
spec.add_development_dependency 'rake'
|
19
|
-
spec.add_development_dependency 'sqlite3', '~> 1.
|
19
|
+
spec.add_development_dependency 'sqlite3', '~> 1.4.2'
|
20
20
|
|
21
21
|
spec.files = `git ls-files`.split($/)
|
22
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |file| File.basename(file) }
|
@@ -1,7 +1,13 @@
|
|
1
1
|
describe :allow_values_for do
|
2
2
|
let(:attribute) { :one }
|
3
3
|
let(:values) { ['123'] }
|
4
|
-
let(:matcher_name)
|
4
|
+
let(:matcher_name) do
|
5
|
+
if self.class.respond_to?(:module_parent)
|
6
|
+
self.class.module_parent.description
|
7
|
+
else
|
8
|
+
self.class.parent.description
|
9
|
+
end
|
10
|
+
end
|
5
11
|
|
6
12
|
let(:model) {
|
7
13
|
build_class :User do
|
@@ -44,7 +44,7 @@ describe :belong_to do
|
|
44
44
|
|
45
45
|
with_option :class_name, 'Company', 'Organization'
|
46
46
|
with_option :foreign_key, :company_id, :organization_id
|
47
|
-
with_option :foreign_type, :company_type, :organization_type
|
47
|
+
with_option :foreign_type, :company_type, :organization_type, polymorphic: true
|
48
48
|
with_option :primary_key, :id, :company_id
|
49
49
|
with_option :dependent, :destroy, :nullify
|
50
50
|
with_option :counter_cache, true, false
|
@@ -47,8 +47,8 @@ describe :have_many do
|
|
47
47
|
with_option(:counter_cache, :post_count, :posts_count)
|
48
48
|
with_option(:as, :postable, :bloggable)
|
49
49
|
with_option(:through, :postings, :bloggings)
|
50
|
-
with_option(:source, :piece, :work)
|
51
|
-
with_option(:source_type, 'Post', 'Blog')
|
50
|
+
with_option(:source, :piece, :work, through: :postings)
|
51
|
+
with_option(:source_type, 'Post', 'Blog', through: :postings)
|
52
52
|
with_option(:validate, true, false)
|
53
53
|
with_option(:autosave, true, false)
|
54
54
|
with_option(:inverse_of, :users, :employees)
|
@@ -14,7 +14,7 @@ class_builder = Module.new do
|
|
14
14
|
def create_table(table_name, options={}, &block)
|
15
15
|
begin
|
16
16
|
drop_table table_name
|
17
|
-
ActiveRecord::Base.connection.create_table table_name, options, &block
|
17
|
+
ActiveRecord::Base.connection.create_table table_name, **options, &block
|
18
18
|
created_tables << table_name
|
19
19
|
rescue
|
20
20
|
drop_table table_name
|
@@ -1,7 +1,13 @@
|
|
1
1
|
shared_examples_for 'a validation matcher' do
|
2
2
|
let(:attribute) { :one }
|
3
3
|
let(:options) { default_options }
|
4
|
-
let(:matcher_name)
|
4
|
+
let(:matcher_name) do
|
5
|
+
if self.class.respond_to?(:module_parent)
|
6
|
+
self.class.module_parent.module_parent.description
|
7
|
+
else
|
8
|
+
self.class.parent.parent.description
|
9
|
+
end
|
10
|
+
end
|
5
11
|
|
6
12
|
let(:model) {
|
7
13
|
build_class :User do
|
@@ -1,12 +1,18 @@
|
|
1
1
|
shared_examples_for 'an Active Record matcher' do
|
2
|
-
let(:matcher_name)
|
2
|
+
let(:matcher_name) do
|
3
|
+
if self.class.respond_to?(:module_parent)
|
4
|
+
self.class.module_parent.module_parent.description
|
5
|
+
else
|
6
|
+
self.class.parent.parent.description
|
7
|
+
end
|
8
|
+
end
|
3
9
|
|
4
10
|
def self.with_option(option_name, positive, negative, context={})
|
5
11
|
context "with option #{option_name.inspect}" do
|
6
|
-
let(:options) {
|
12
|
+
let(:options) { context.merge(option_name => positive) }
|
7
13
|
|
8
14
|
before do
|
9
|
-
model.send macro,
|
15
|
+
model.send macro, :company, **options
|
10
16
|
end
|
11
17
|
|
12
18
|
it 'matches if the options match' do
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Hunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activerecord
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '4.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '6.2'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '4.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '6.2'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: activesupport
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '4.0'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '6.2'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
version: '4.0'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '6.2'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: rspec-core
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,14 +146,14 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - "~>"
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 1.
|
149
|
+
version: 1.4.2
|
150
150
|
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
154
|
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: 1.
|
156
|
+
version: 1.4.2
|
157
157
|
description:
|
158
158
|
email:
|
159
159
|
executables: []
|
@@ -177,6 +177,10 @@ files:
|
|
177
177
|
- gemfiles/rails_5.1.gemfile.lock
|
178
178
|
- gemfiles/rails_5.2.gemfile
|
179
179
|
- gemfiles/rails_5.2.gemfile.lock
|
180
|
+
- gemfiles/rails_6.0.gemfile
|
181
|
+
- gemfiles/rails_6.0.gemfile.lock
|
182
|
+
- gemfiles/rails_6.1.gemfile
|
183
|
+
- gemfiles/rails_6.1.gemfile.lock
|
180
184
|
- lib/remockable.rb
|
181
185
|
- lib/remockable/active_model.rb
|
182
186
|
- lib/remockable/active_model/allow_values_for.rb
|
@@ -249,8 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
253
|
- !ruby/object:Gem::Version
|
250
254
|
version: '0'
|
251
255
|
requirements: []
|
252
|
-
|
253
|
-
rubygems_version: 2.7.6
|
256
|
+
rubygems_version: 3.1.2
|
254
257
|
signing_key:
|
255
258
|
specification_version: 4
|
256
259
|
summary: A collection of RSpec matchers for web apps.
|