shoulda 3.4.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -7
  3. data/.hound.yml +3 -0
  4. data/.rubocop.yml +192 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +33 -2
  7. data/Appraisals +109 -8
  8. data/CHANGELOG.md +10 -0
  9. data/CONTRIBUTING.md +6 -1
  10. data/Gemfile +13 -0
  11. data/README.md +67 -74
  12. data/Rakefile +24 -10
  13. data/gemfiles/rails_4_2.gemfile +34 -0
  14. data/gemfiles/rails_4_2.gemfile.lock +240 -0
  15. data/gemfiles/rails_5_0.gemfile +32 -0
  16. data/gemfiles/rails_5_0.gemfile.lock +232 -0
  17. data/gemfiles/rails_5_1.gemfile +33 -0
  18. data/gemfiles/rails_5_1.gemfile.lock +247 -0
  19. data/gemfiles/rails_5_2.gemfile +35 -0
  20. data/gemfiles/rails_5_2.gemfile.lock +266 -0
  21. data/gemfiles/rails_6_0.gemfile +37 -0
  22. data/gemfiles/rails_6_0.gemfile.lock +291 -0
  23. data/lib/shoulda/version.rb +1 -1
  24. data/script/install_gems_in_all_appraisals +16 -0
  25. data/script/run_all_tests +16 -0
  26. data/script/supported_ruby_versions +7 -0
  27. data/script/update_gem_in_all_appraisals +17 -0
  28. data/script/update_gems_in_all_appraisals +16 -0
  29. data/shoulda.gemspec +23 -23
  30. data/test/acceptance/integrates_with_rails_test.rb +580 -0
  31. data/test/acceptance_test_helper.rb +43 -0
  32. data/test/support/acceptance/add_shoulda_to_project.rb +73 -0
  33. data/test/support/acceptance/helpers/array_helpers.rb +13 -0
  34. data/test/support/acceptance/helpers/pluralization_helpers.rb +13 -0
  35. data/test/support/acceptance/matchers/have_output.rb +33 -0
  36. data/test/support/acceptance/matchers/indicate_that_tests_were_run.rb +109 -0
  37. data/test/support/acceptance/rails_application_with_shoulda.rb +47 -0
  38. data/test/support/current_bundle.rb +61 -0
  39. data/test/support/snowglobe.rb +5 -0
  40. data/test/test_helper.rb +23 -0
  41. metadata +61 -153
  42. data/features/rails_integration.feature +0 -87
  43. data/features/step_definitions/rails_steps.rb +0 -77
  44. data/features/support/env.rb +0 -14
  45. data/gemfiles/3.0.gemfile +0 -7
  46. data/gemfiles/3.0.gemfile.lock +0 -127
  47. data/gemfiles/3.1.gemfile +0 -9
  48. data/gemfiles/3.1.gemfile.lock +0 -149
  49. data/gemfiles/3.2.gemfile +0 -9
  50. data/gemfiles/3.2.gemfile.lock +0 -146
@@ -0,0 +1,37 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.1"
6
+ gem "bundler", "~> 1.0"
7
+ gem "m"
8
+ gem "minitest", "~> 5.0"
9
+ gem "minitest-reporters"
10
+ gem "mry"
11
+ gem "pry", "~> 0.12.0"
12
+ gem "pry-byebug", "~> 3.6.0"
13
+ gem "rubocop", "0.71.0", require: false
14
+ gem "rubocop-rails", require: false
15
+ gem "snowglobe", ">= 0.3.0"
16
+ gem "warnings_logger"
17
+ gem "sqlite3", "~> 1.4.0"
18
+ gem "rubyzip", "~> 1.3.0"
19
+ gem "spring"
20
+ gem "spring-commands-rspec"
21
+ gem "rails", "~> 6.0.2"
22
+ gem "puma", "~> 4.1"
23
+ gem "sass-rails", ">= 6"
24
+ gem "webpacker", "~> 4.0"
25
+ gem "turbolinks", "~> 5"
26
+ gem "jbuilder", "~> 2.7"
27
+ gem "bcrypt", "~> 3.1.7"
28
+ gem "bootsnap", ">= 1.4.2", require: false
29
+ gem "listen", ">= 3.0.5", "< 3.2"
30
+ gem "spring-watcher-listen", "~> 2.0.0"
31
+ gem "capybara", ">= 2.15"
32
+ gem "selenium-webdriver"
33
+ gem "webdrivers"
34
+ gem "rails-controller-testing", ">= 1.0.4"
35
+ gem "pg", "~> 1.1", platform: :ruby
36
+
37
+ gemspec path: "../"
@@ -0,0 +1,291 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ shoulda (4.0.0)
5
+ shoulda-context (~> 2.0)
6
+ shoulda-matchers (~> 4.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (6.0.2.2)
12
+ actionpack (= 6.0.2.2)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (6.0.2.2)
16
+ actionpack (= 6.0.2.2)
17
+ activejob (= 6.0.2.2)
18
+ activerecord (= 6.0.2.2)
19
+ activestorage (= 6.0.2.2)
20
+ activesupport (= 6.0.2.2)
21
+ mail (>= 2.7.1)
22
+ actionmailer (6.0.2.2)
23
+ actionpack (= 6.0.2.2)
24
+ actionview (= 6.0.2.2)
25
+ activejob (= 6.0.2.2)
26
+ mail (~> 2.5, >= 2.5.4)
27
+ rails-dom-testing (~> 2.0)
28
+ actionpack (6.0.2.2)
29
+ actionview (= 6.0.2.2)
30
+ activesupport (= 6.0.2.2)
31
+ rack (~> 2.0, >= 2.0.8)
32
+ rack-test (>= 0.6.3)
33
+ rails-dom-testing (~> 2.0)
34
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
+ actiontext (6.0.2.2)
36
+ actionpack (= 6.0.2.2)
37
+ activerecord (= 6.0.2.2)
38
+ activestorage (= 6.0.2.2)
39
+ activesupport (= 6.0.2.2)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (6.0.2.2)
42
+ activesupport (= 6.0.2.2)
43
+ builder (~> 3.1)
44
+ erubi (~> 1.4)
45
+ rails-dom-testing (~> 2.0)
46
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
+ activejob (6.0.2.2)
48
+ activesupport (= 6.0.2.2)
49
+ globalid (>= 0.3.6)
50
+ activemodel (6.0.2.2)
51
+ activesupport (= 6.0.2.2)
52
+ activerecord (6.0.2.2)
53
+ activemodel (= 6.0.2.2)
54
+ activesupport (= 6.0.2.2)
55
+ activestorage (6.0.2.2)
56
+ actionpack (= 6.0.2.2)
57
+ activejob (= 6.0.2.2)
58
+ activerecord (= 6.0.2.2)
59
+ marcel (~> 0.3.1)
60
+ activesupport (6.0.2.2)
61
+ concurrent-ruby (~> 1.0, >= 1.0.2)
62
+ i18n (>= 0.7, < 2)
63
+ minitest (~> 5.1)
64
+ tzinfo (~> 1.1)
65
+ zeitwerk (~> 2.2)
66
+ addressable (2.7.0)
67
+ public_suffix (>= 2.0.2, < 5.0)
68
+ ansi (1.5.0)
69
+ appraisal (2.2.0)
70
+ bundler
71
+ rake
72
+ thor (>= 0.14.0)
73
+ ast (2.4.0)
74
+ bcrypt (3.1.13)
75
+ bootsnap (1.4.6)
76
+ msgpack (~> 1.0)
77
+ builder (3.2.4)
78
+ byebug (10.0.2)
79
+ capybara (3.32.0)
80
+ addressable
81
+ mini_mime (>= 0.1.3)
82
+ nokogiri (~> 1.8)
83
+ rack (>= 1.6.0)
84
+ rack-test (>= 0.6.3)
85
+ regexp_parser (~> 1.5)
86
+ xpath (~> 3.2)
87
+ childprocess (3.0.0)
88
+ coderay (1.1.2)
89
+ concurrent-ruby (1.1.6)
90
+ crass (1.0.6)
91
+ erubi (1.9.0)
92
+ ffi (1.12.2)
93
+ globalid (0.4.2)
94
+ activesupport (>= 4.2.0)
95
+ i18n (1.8.2)
96
+ concurrent-ruby (~> 1.0)
97
+ jaro_winkler (1.5.4)
98
+ jbuilder (2.10.0)
99
+ activesupport (>= 5.0.0)
100
+ listen (3.1.5)
101
+ rb-fsevent (~> 0.9, >= 0.9.4)
102
+ rb-inotify (~> 0.9, >= 0.9.7)
103
+ ruby_dep (~> 1.2)
104
+ loofah (2.4.0)
105
+ crass (~> 1.0.2)
106
+ nokogiri (>= 1.5.9)
107
+ m (1.5.1)
108
+ method_source (>= 0.6.7)
109
+ rake (>= 0.9.2.2)
110
+ mail (2.7.1)
111
+ mini_mime (>= 0.1.1)
112
+ marcel (0.3.3)
113
+ mimemagic (~> 0.3.2)
114
+ method_source (0.9.2)
115
+ mimemagic (0.3.4)
116
+ mini_mime (1.0.2)
117
+ mini_portile2 (2.4.0)
118
+ minitest (5.14.0)
119
+ minitest-reporters (1.4.2)
120
+ ansi
121
+ builder
122
+ minitest (>= 5.0)
123
+ ruby-progressbar
124
+ mry (0.78.0.0)
125
+ rubocop (>= 0.41.0)
126
+ msgpack (1.3.3)
127
+ nio4r (2.5.2)
128
+ nokogiri (1.10.9)
129
+ mini_portile2 (~> 2.4.0)
130
+ parallel (1.19.1)
131
+ parser (2.7.1.0)
132
+ ast (~> 2.4.0)
133
+ pg (1.2.3)
134
+ pry (0.12.2)
135
+ coderay (~> 1.1.0)
136
+ method_source (~> 0.9.0)
137
+ pry-byebug (3.6.0)
138
+ byebug (~> 10.0)
139
+ pry (~> 0.10)
140
+ public_suffix (4.0.3)
141
+ puma (4.3.3)
142
+ nio4r (~> 2.0)
143
+ rack (2.2.2)
144
+ rack-proxy (0.6.5)
145
+ rack
146
+ rack-test (1.1.0)
147
+ rack (>= 1.0, < 3)
148
+ rails (6.0.2.2)
149
+ actioncable (= 6.0.2.2)
150
+ actionmailbox (= 6.0.2.2)
151
+ actionmailer (= 6.0.2.2)
152
+ actionpack (= 6.0.2.2)
153
+ actiontext (= 6.0.2.2)
154
+ actionview (= 6.0.2.2)
155
+ activejob (= 6.0.2.2)
156
+ activemodel (= 6.0.2.2)
157
+ activerecord (= 6.0.2.2)
158
+ activestorage (= 6.0.2.2)
159
+ activesupport (= 6.0.2.2)
160
+ bundler (>= 1.3.0)
161
+ railties (= 6.0.2.2)
162
+ sprockets-rails (>= 2.0.0)
163
+ rails-controller-testing (1.0.4)
164
+ actionpack (>= 5.0.1.x)
165
+ actionview (>= 5.0.1.x)
166
+ activesupport (>= 5.0.1.x)
167
+ rails-dom-testing (2.0.3)
168
+ activesupport (>= 4.2.0)
169
+ nokogiri (>= 1.6)
170
+ rails-html-sanitizer (1.3.0)
171
+ loofah (~> 2.3)
172
+ railties (6.0.2.2)
173
+ actionpack (= 6.0.2.2)
174
+ activesupport (= 6.0.2.2)
175
+ method_source
176
+ rake (>= 0.8.7)
177
+ thor (>= 0.20.3, < 2.0)
178
+ rainbow (3.0.0)
179
+ rake (13.0.1)
180
+ rb-fsevent (0.10.3)
181
+ rb-inotify (0.10.1)
182
+ ffi (~> 1.0)
183
+ regexp_parser (1.7.0)
184
+ rubocop (0.71.0)
185
+ jaro_winkler (~> 1.5.1)
186
+ parallel (~> 1.10)
187
+ parser (>= 2.6)
188
+ rainbow (>= 2.2.2, < 4.0)
189
+ ruby-progressbar (~> 1.7)
190
+ unicode-display_width (>= 1.4.0, < 1.7)
191
+ rubocop-rails (2.0.1)
192
+ rack (>= 1.1)
193
+ rubocop (>= 0.70.0)
194
+ ruby-progressbar (1.10.1)
195
+ ruby_dep (1.5.0)
196
+ rubyzip (1.3.0)
197
+ sass-rails (6.0.0)
198
+ sassc-rails (~> 2.1, >= 2.1.1)
199
+ sassc (2.2.1)
200
+ ffi (~> 1.9)
201
+ sassc-rails (2.1.2)
202
+ railties (>= 4.0.0)
203
+ sassc (>= 2.0)
204
+ sprockets (> 3.0)
205
+ sprockets-rails
206
+ tilt
207
+ selenium-webdriver (3.142.7)
208
+ childprocess (>= 0.5, < 4.0)
209
+ rubyzip (>= 1.2.2)
210
+ shoulda-context (2.0.0)
211
+ shoulda-matchers (4.3.0)
212
+ activesupport (>= 4.2.0)
213
+ snowglobe (0.3.0)
214
+ spring (2.1.0)
215
+ spring-commands-rspec (1.0.4)
216
+ spring (>= 0.9.1)
217
+ spring-watcher-listen (2.0.1)
218
+ listen (>= 2.7, < 4.0)
219
+ spring (>= 1.2, < 3.0)
220
+ sprockets (4.0.0)
221
+ concurrent-ruby (~> 1.0)
222
+ rack (> 1, < 3)
223
+ sprockets-rails (3.2.1)
224
+ actionpack (>= 4.0)
225
+ activesupport (>= 4.0)
226
+ sprockets (>= 3.0.0)
227
+ sqlite3 (1.4.2)
228
+ thor (1.0.1)
229
+ thread_safe (0.3.6)
230
+ tilt (2.0.10)
231
+ turbolinks (5.2.1)
232
+ turbolinks-source (~> 5.2)
233
+ turbolinks-source (5.2.0)
234
+ tzinfo (1.2.7)
235
+ thread_safe (~> 0.1)
236
+ unicode-display_width (1.6.1)
237
+ warnings_logger (0.1.0)
238
+ webdrivers (4.2.0)
239
+ nokogiri (~> 1.6)
240
+ rubyzip (>= 1.3.0)
241
+ selenium-webdriver (>= 3.0, < 4.0)
242
+ webpacker (4.2.2)
243
+ activesupport (>= 4.2)
244
+ rack-proxy (>= 0.6.1)
245
+ railties (>= 4.2)
246
+ websocket-driver (0.7.1)
247
+ websocket-extensions (>= 0.1.0)
248
+ websocket-extensions (0.1.4)
249
+ xpath (3.2.0)
250
+ nokogiri (~> 1.8)
251
+ zeitwerk (2.3.0)
252
+
253
+ PLATFORMS
254
+ ruby
255
+
256
+ DEPENDENCIES
257
+ appraisal (~> 2.1)
258
+ bcrypt (~> 3.1.7)
259
+ bootsnap (>= 1.4.2)
260
+ bundler (~> 1.0)
261
+ capybara (>= 2.15)
262
+ jbuilder (~> 2.7)
263
+ listen (>= 3.0.5, < 3.2)
264
+ m
265
+ minitest (~> 5.0)
266
+ minitest-reporters
267
+ mry
268
+ pg (~> 1.1)
269
+ pry (~> 0.12.0)
270
+ pry-byebug (~> 3.6.0)
271
+ puma (~> 4.1)
272
+ rails (~> 6.0.2)
273
+ rails-controller-testing (>= 1.0.4)
274
+ rubocop (= 0.71.0)
275
+ rubocop-rails
276
+ rubyzip (~> 1.3.0)
277
+ sass-rails (>= 6)
278
+ selenium-webdriver
279
+ shoulda!
280
+ snowglobe (>= 0.3.0)
281
+ spring
282
+ spring-commands-rspec
283
+ spring-watcher-listen (~> 2.0.0)
284
+ sqlite3 (~> 1.4.0)
285
+ turbolinks (~> 5)
286
+ warnings_logger
287
+ webdrivers
288
+ webpacker (~> 4.0)
289
+
290
+ BUNDLED WITH
291
+ 1.17.3
@@ -1,3 +1,3 @@
1
1
  module Shoulda
2
- VERSION = "3.4.0"
2
+ VERSION = '4.0.0'.freeze
3
3
  end
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ SUPPORTED_VERSIONS=$(script/supported_ruby_versions)
6
+
7
+ install-gems-for-version() {
8
+ local version="$1"
9
+ (export RBENV_VERSION=$version; bundle && bundle exec appraisal install)
10
+ }
11
+
12
+ for version in $SUPPORTED_VERSIONS; do
13
+ echo
14
+ echo "*** Installing gems for $version ***"
15
+ install-gems-for-version $version
16
+ done
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ SUPPORTED_VERSIONS=$(script/supported_ruby_versions)
6
+
7
+ run-tests-for-version() {
8
+ local version="$1"
9
+ (export RBENV_VERSION=$version; bundle exec rake)
10
+ }
11
+
12
+ for version in $SUPPORTED_VERSIONS; do
13
+ echo
14
+ echo "*** Running tests for $version ***"
15
+ run-tests-for-version $version
16
+ done
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'yaml'
4
+
5
+ travis_config_path = File.expand_path('../../.travis.yml', __FILE__)
6
+ travis_config = YAML.load_file(travis_config_path)
7
+ puts travis_config.fetch('rvm').join(' ')
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ SUPPORTED_VERSIONS=$(script/supported_ruby_versions)
6
+ gem="$1"
7
+
8
+ update-gem-for-version() {
9
+ local version="$1"
10
+ (export RBENV_VERSION=$version; bundle update "$gem"; bundle exec appraisal update "$gem")
11
+ }
12
+
13
+ for version in $SUPPORTED_VERSIONS; do
14
+ echo
15
+ echo "*** Updating $gem for $version ***"
16
+ update-gem-for-version $version
17
+ done
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ SUPPORTED_VERSIONS=$(script/supported_ruby_versions)
6
+
7
+ update-gems-for-version() {
8
+ local version="$1"
9
+ (export RBENV_VERSION=$version; bundle update "${@:2}"; bundle exec appraisal update "${@:2}")
10
+ }
11
+
12
+ for version in $SUPPORTED_VERSIONS; do
13
+ echo
14
+ echo "*** Updating gems for $version ***"
15
+ update-gems-for-version "$version" "$@"
16
+ done
@@ -2,29 +2,29 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
2
2
  require 'shoulda/version'
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = 'shoulda'
6
- s.version = Shoulda::VERSION
7
- s.platform = Gem::Platform::RUBY
8
- s.authors = ["Tammer Saleh", "Joe Ferris", "Ryan McGeary", "Dan Croak",
9
- "Matt Jankowski"]
10
- s.email = %q{support@thoughtbot.com}
11
- s.homepage = %q{https://github.com/thoughtbot/shoulda}
12
- s.summary = %q{Making tests easy on the fingers and eyes}
13
- s.description = %q{Making tests easy on the fingers and eyes}
14
- s.license = %q{MIT}
5
+ s.name = 'shoulda'
6
+ s.version = Shoulda::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = [
9
+ 'Tammer Saleh',
10
+ 'Joe Ferris',
11
+ 'Ryan McGeary',
12
+ 'Dan Croak',
13
+ 'Matt Jankowski',
14
+ ]
15
+ s.email = 'support@thoughtbot.com'
16
+ s.homepage = 'https://github.com/thoughtbot/shoulda'
17
+ s.summary = 'Making tests easy on the fingers and eyes'
18
+ s.description = 'Making tests easy on the fingers and eyes'
19
+ s.license = 'MIT'
15
20
 
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.require_paths = ["lib"]
21
+ s.files = `git ls-files`.split("\n")
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.executables = `git ls-files -- bin/*`.split("\n").map do |file|
24
+ File.basename(file)
25
+ end
26
+ s.require_paths = ['lib']
20
27
 
21
- s.add_dependency("shoulda-context", ["~> 1.0", ">= 1.0.1"])
22
- s.add_dependency("shoulda-matchers", ["~> 1.0", ">= 1.4.1"])
23
-
24
- s.add_development_dependency('appraisal', '~> 0.4.0')
25
- s.add_development_dependency("rails", "3.0.12")
26
- s.add_development_dependency("sqlite3", "~> 1.3.2")
27
- s.add_development_dependency("rspec-rails", "~> 2.7.0")
28
- s.add_development_dependency("cucumber", "~> 1.1.0")
29
- s.add_development_dependency("aruba", "~> 0.4.11")
28
+ s.add_dependency('shoulda-context', '~> 2.0')
29
+ s.add_dependency('shoulda-matchers', '~> 4.0')
30
30
  end