shoulda 3.6.0 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +181 -2
- data/.ruby-version +1 -0
- data/.travis.yml +24 -9
- data/Appraisals +108 -10
- data/Gemfile +9 -5
- data/README.md +24 -17
- data/Rakefile +18 -13
- data/gemfiles/rails_4_2.gemfile +31 -0
- data/gemfiles/rails_4_2.gemfile.lock +240 -0
- data/gemfiles/rails_5_0.gemfile +29 -0
- data/gemfiles/rails_5_0.gemfile.lock +232 -0
- data/gemfiles/rails_5_1.gemfile +30 -0
- data/gemfiles/rails_5_1.gemfile.lock +249 -0
- data/gemfiles/rails_5_2.gemfile +32 -0
- data/gemfiles/rails_5_2.gemfile.lock +268 -0
- data/gemfiles/rails_6_0.gemfile +34 -0
- data/gemfiles/rails_6_0.gemfile.lock +285 -0
- data/lib/shoulda/version.rb +1 -1
- data/script/install_gems_in_all_appraisals +16 -0
- data/script/run_all_tests +16 -0
- data/script/supported_ruby_versions +7 -0
- data/script/update_gem_in_all_appraisals +17 -0
- data/script/update_gems_in_all_appraisals +16 -0
- data/shoulda.gemspec +3 -3
- data/test/acceptance/integrates_with_rails_test.rb +580 -0
- data/test/acceptance_test_helper.rb +32 -6
- data/test/support/acceptance/add_shoulda_to_project.rb +13 -18
- data/test/support/acceptance/matchers/have_output.rb +2 -0
- data/test/support/acceptance/matchers/indicate_that_tests_were_run.rb +109 -0
- data/test/support/acceptance/rails_application_with_shoulda.rb +47 -0
- data/test/support/{tests/current_bundle.rb → current_bundle.rb} +4 -4
- data/test/support/snowglobe.rb +5 -0
- data/test/test_helper.rb +9 -4
- metadata +37 -65
- data/.hound/ruby.yml +0 -1042
- data/gemfiles/4.2.gemfile +0 -17
- data/gemfiles/4.2.gemfile.lock +0 -174
- data/gemfiles/5.0.gemfile +0 -17
- data/gemfiles/5.0.gemfile.lock +0 -179
- data/test/acceptance/rails_integration_test.rb +0 -76
- data/test/report_warnings.rb +0 -7
- data/test/support/acceptance/helpers.rb +0 -19
- data/test/support/acceptance/helpers/active_model_helpers.rb +0 -11
- data/test/support/acceptance/helpers/base_helpers.rb +0 -14
- data/test/support/acceptance/helpers/command_helpers.rb +0 -54
- data/test/support/acceptance/helpers/file_helpers.rb +0 -19
- data/test/support/acceptance/helpers/gem_helpers.rb +0 -31
- data/test/support/acceptance/helpers/step_helpers.rb +0 -69
- data/test/support/acceptance/matchers/indicate_number_of_tests_was_run_matcher.rb +0 -54
- data/test/support/acceptance/matchers/indicate_that_tests_were_run_matcher.rb +0 -75
- data/test/support/tests/bundle.rb +0 -94
- data/test/support/tests/command_runner.rb +0 -230
- data/test/support/tests/filesystem.rb +0 -100
- data/test/support/tests/version.rb +0 -45
- data/test/warnings_spy.rb +0 -62
- data/test/warnings_spy/filesystem.rb +0 -45
- data/test/warnings_spy/partitioner.rb +0 -36
- data/test/warnings_spy/reader.rb +0 -53
- data/test/warnings_spy/reporter.rb +0 -88
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b87e253682d87a9713acd221ad7201c6ed1885d23eea6727dc8af5432432ee84
|
4
|
+
data.tar.gz: f28166eed87bc29a895445d5c5175aac1b08eff2b7d577eaee3b5c9a53524574
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e53a4b9fb2c8b90bc09d95f8dde8100c3849481a3978c355539addccd19b4dd18cd74ae52724f9d57891c5e838577c726a0422451b1432536d09c19317e48b
|
7
|
+
data.tar.gz: b55e8b92f1655845712ad2affe99681ad0917c3bc8edfdb547737c36e4dceac713249f9f69121d7bbb6407c49691bc06fe4728f21c6c00b12c1bef663183788d
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,13 +1,192 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.4
|
3
|
+
Layout/ParameterAlignment:
|
3
4
|
EnforcedStyle: with_fixed_indentation
|
5
|
+
Layout/ConditionPosition:
|
6
|
+
Enabled: false
|
7
|
+
Layout/DotPosition:
|
8
|
+
EnforcedStyle: trailing
|
9
|
+
Layout/HeredocIndentation:
|
10
|
+
Enabled: false
|
11
|
+
Layout/MultilineMethodCallIndentation:
|
12
|
+
EnforcedStyle: indented
|
13
|
+
Lint/AmbiguousOperator:
|
14
|
+
Enabled: false
|
15
|
+
Lint/AmbiguousRegexpLiteral:
|
16
|
+
Enabled: false
|
17
|
+
Lint/AssignmentInCondition:
|
18
|
+
Enabled: false
|
19
|
+
Lint/DeprecatedClassMethods:
|
20
|
+
Enabled: false
|
21
|
+
Lint/ElseLayout:
|
22
|
+
Enabled: false
|
23
|
+
Lint/SuppressedException:
|
24
|
+
Enabled: false
|
25
|
+
Lint/LiteralInInterpolation:
|
26
|
+
Enabled: false
|
27
|
+
Lint/Loop:
|
28
|
+
Enabled: false
|
29
|
+
Lint/ParenthesesAsGroupedExpression:
|
30
|
+
Enabled: false
|
31
|
+
Lint/RequireParentheses:
|
32
|
+
Enabled: false
|
33
|
+
Lint/UnderscorePrefixedVariableName:
|
34
|
+
Enabled: false
|
35
|
+
Lint/Void:
|
36
|
+
Enabled: false
|
37
|
+
Metrics/BlockLength:
|
38
|
+
Enabled: false
|
39
|
+
Metrics/ClassLength:
|
40
|
+
Enabled: false
|
41
|
+
Metrics/LineLength:
|
42
|
+
IgnoredPatterns:
|
43
|
+
- "^[ ]*describe.+$"
|
44
|
+
- "^[ ]*context.+$"
|
45
|
+
- "^[ ]*shared_context.+$"
|
46
|
+
- "^[ ]*shared_examples_for.+$"
|
47
|
+
- "^[ ]*it.+$"
|
48
|
+
- "^[ ]*'.+?' => '.+?',?$"
|
49
|
+
- "^[ ]*\".+?\" => \".+?\",?$"
|
50
|
+
- "^[ ]*.+?: .+?$"
|
51
|
+
Metrics/MethodLength:
|
52
|
+
Max: 30
|
53
|
+
Naming/AccessorMethodName:
|
54
|
+
Enabled: false
|
55
|
+
Naming/AsciiIdentifiers:
|
56
|
+
Enabled: false
|
57
|
+
Naming/BinaryOperatorParameterName:
|
58
|
+
Enabled: false
|
59
|
+
Style/ClassVars:
|
60
|
+
Enabled: false
|
61
|
+
Style/ColonMethodCall:
|
62
|
+
Enabled: false
|
63
|
+
Naming/FileName:
|
64
|
+
Enabled: false
|
65
|
+
Rails:
|
66
|
+
Enabled: true
|
67
|
+
Rails/Delegate:
|
68
|
+
Enabled: false
|
69
|
+
Rails/HttpPositionalArguments:
|
70
|
+
Enabled: false
|
71
|
+
Style/Alias:
|
72
|
+
Enabled: false
|
73
|
+
Style/ArrayJoin:
|
74
|
+
Enabled: false
|
75
|
+
Style/AsciiComments:
|
76
|
+
Enabled: false
|
77
|
+
Style/Attr:
|
78
|
+
Enabled: false
|
79
|
+
Style/CaseEquality:
|
80
|
+
Enabled: false
|
81
|
+
Style/CharacterLiteral:
|
82
|
+
Enabled: false
|
83
|
+
Style/ClassAndModuleChildren:
|
84
|
+
Enabled: false
|
4
85
|
Style/CollectionMethods:
|
5
86
|
PreferredMethods:
|
6
87
|
find: detect
|
7
88
|
reduce: inject
|
8
89
|
collect: map
|
9
90
|
find_all: select
|
91
|
+
Style/CommentAnnotation:
|
92
|
+
Enabled: false
|
93
|
+
Style/Documentation:
|
94
|
+
Enabled: false
|
95
|
+
Style/DoubleNegation:
|
96
|
+
Enabled: false
|
97
|
+
Style/EachWithObject:
|
98
|
+
Enabled: false
|
99
|
+
Style/EmptyLiteral:
|
100
|
+
Enabled: false
|
101
|
+
Style/Encoding:
|
102
|
+
Enabled: false
|
103
|
+
Style/EvenOdd:
|
104
|
+
Enabled: false
|
105
|
+
Lint/FlipFlop:
|
106
|
+
Enabled: false
|
107
|
+
Style/FormatString:
|
108
|
+
Enabled: false
|
10
109
|
Style/FrozenStringLiteralComment:
|
11
110
|
Enabled: false
|
111
|
+
Style/GlobalVars:
|
112
|
+
Enabled: false
|
113
|
+
Style/GuardClause:
|
114
|
+
Enabled: false
|
115
|
+
Style/IfUnlessModifier:
|
116
|
+
Enabled: false
|
117
|
+
Style/IfWithSemicolon:
|
118
|
+
Enabled: false
|
119
|
+
Style/InlineComment:
|
120
|
+
Enabled: false
|
121
|
+
Style/Lambda:
|
122
|
+
Enabled: false
|
123
|
+
Style/LambdaCall:
|
124
|
+
Enabled: false
|
125
|
+
Style/LineEndConcatenation:
|
126
|
+
Enabled: false
|
127
|
+
Style/MethodCalledOnDoEndBlock:
|
128
|
+
Enabled: false
|
129
|
+
Style/ModuleFunction:
|
130
|
+
Enabled: false
|
131
|
+
Style/NegatedIf:
|
132
|
+
Enabled: false
|
133
|
+
Style/NegatedWhile:
|
134
|
+
Enabled: false
|
135
|
+
Style/Next:
|
136
|
+
Enabled: false
|
137
|
+
Style/NilComparison:
|
138
|
+
Enabled: false
|
139
|
+
Style/Not:
|
140
|
+
Enabled: false
|
141
|
+
Style/NumericLiterals:
|
142
|
+
Enabled: false
|
143
|
+
Style/NumericPredicate:
|
144
|
+
Enabled: false
|
145
|
+
Style/OneLineConditional:
|
146
|
+
Enabled: false
|
147
|
+
Style/ParenthesesAroundCondition:
|
148
|
+
Enabled: false
|
149
|
+
Style/PercentLiteralDelimiters:
|
150
|
+
Enabled: false
|
151
|
+
Style/PerlBackrefs:
|
152
|
+
Enabled: false
|
153
|
+
Style/PreferredHashMethods:
|
154
|
+
Enabled: false
|
155
|
+
Style/Proc:
|
156
|
+
Enabled: false
|
157
|
+
Style/RaiseArgs:
|
158
|
+
Enabled: false
|
159
|
+
Style/RedundantParentheses:
|
160
|
+
Enabled: false
|
161
|
+
Style/RegexpLiteral:
|
162
|
+
Enabled: false
|
163
|
+
Style/SelfAssignment:
|
164
|
+
Enabled: false
|
165
|
+
Style/SignalException:
|
166
|
+
Enabled: false
|
167
|
+
Style/SingleLineBlockParams:
|
168
|
+
Enabled: false
|
169
|
+
Style/SingleLineMethods:
|
170
|
+
Enabled: false
|
171
|
+
Style/SpecialGlobalVars:
|
172
|
+
Enabled: false
|
12
173
|
Style/StringLiterals:
|
13
174
|
EnforcedStyle: single_quotes
|
175
|
+
Style/SymbolArray:
|
176
|
+
Enabled: false
|
177
|
+
Style/TrailingCommaInArguments:
|
178
|
+
EnforcedStyleForMultiline: consistent_comma
|
179
|
+
Style/TrailingCommaInArrayLiteral:
|
180
|
+
EnforcedStyleForMultiline: consistent_comma
|
181
|
+
Style/TrailingCommaInHashLiteral:
|
182
|
+
EnforcedStyleForMultiline: consistent_comma
|
183
|
+
Style/TrivialAccessors:
|
184
|
+
Enabled: false
|
185
|
+
Style/WhenThen:
|
186
|
+
Enabled: false
|
187
|
+
Style/WhileUntilModifier:
|
188
|
+
Enabled: false
|
189
|
+
Style/WordArray:
|
190
|
+
Enabled: false
|
191
|
+
Style/VariableInterpolation:
|
192
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.3
|
data/.travis.yml
CHANGED
@@ -1,12 +1,27 @@
|
|
1
|
+
dist: trusty
|
1
2
|
language: ruby
|
2
|
-
|
3
|
-
cache: bundler
|
4
|
-
script: "bundle exec rake"
|
3
|
+
dist: xenial
|
5
4
|
rvm:
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- 2.
|
9
|
-
- 2.5.1
|
5
|
+
- 2.4.6
|
6
|
+
- 2.5.5
|
7
|
+
- 2.6.3
|
10
8
|
gemfile:
|
11
|
-
- gemfiles/
|
12
|
-
- gemfiles/
|
9
|
+
- gemfiles/rails_4_2.gemfile
|
10
|
+
- gemfiles/rails_5_0.gemfile
|
11
|
+
- gemfiles/rails_5_1.gemfile
|
12
|
+
- gemfiles/rails_5_2.gemfile
|
13
|
+
- gemfiles/rails_6_0.gemfile
|
14
|
+
matrix:
|
15
|
+
exclude:
|
16
|
+
- rvm: 2.4.6
|
17
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
18
|
+
- rvm: 2.6.3
|
19
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
20
|
+
# Source: <https://docs.travis-ci.com/user/languages/ruby/#bundler-20>
|
21
|
+
before_install:
|
22
|
+
- gem update --system '2.7.8' --no-document
|
23
|
+
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
24
|
+
- gem install bundler -v '< 2' --no-document
|
25
|
+
- nvm use v11.0.0
|
26
|
+
install: "bundle install --jobs=3 --retry=3 --path vendor/bundle"
|
27
|
+
script: "bundle exec rake"
|
data/Appraisals
CHANGED
@@ -1,18 +1,116 @@
|
|
1
|
+
# Note: All of the dependencies here were obtained by running `rails new` with
|
2
|
+
# various versions of Rails and copying lines from the generated Gemfile. It's
|
3
|
+
# best to keep the gems here in the same order as they're listed there so you
|
4
|
+
# can compare them more easily.
|
5
|
+
|
6
|
+
shared_rails_dependencies = proc do
|
7
|
+
gem 'sqlite3', platform: :ruby
|
8
|
+
end
|
9
|
+
|
10
|
+
shared_spring_dependencies = proc do
|
11
|
+
gem 'spring'
|
12
|
+
gem 'spring-commands-rspec'
|
13
|
+
end
|
14
|
+
|
15
|
+
shared_test_dependencies = proc do
|
16
|
+
gem 'minitest-reporters'
|
17
|
+
end
|
18
|
+
|
1
19
|
shared_dependencies = proc do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
gem 'rspec', '~> 3.0'
|
6
|
-
gem 'shoulda-context'
|
7
|
-
gem 'shoulda-matchers', '~> 3.0'
|
20
|
+
instance_eval(&shared_rails_dependencies)
|
21
|
+
instance_eval(&shared_spring_dependencies)
|
22
|
+
instance_eval(&shared_test_dependencies)
|
8
23
|
end
|
9
24
|
|
10
|
-
appraise '
|
25
|
+
appraise 'rails_4_2' do
|
11
26
|
instance_eval(&shared_dependencies)
|
12
|
-
|
27
|
+
|
28
|
+
gem 'rails', '~> 4.2.10'
|
29
|
+
gem 'sass-rails', '~> 5.0'
|
30
|
+
gem 'uglifier', '>= 1.3.0'
|
31
|
+
gem 'coffee-rails', '~> 4.1.0'
|
32
|
+
gem 'jquery-rails'
|
33
|
+
gem 'turbolinks'
|
34
|
+
gem 'jbuilder', '~> 2.0'
|
35
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
36
|
+
gem 'bcrypt', '~> 3.1.7'
|
37
|
+
|
38
|
+
# Other dependencies we use
|
39
|
+
gem 'activeresource', '4.0.0'
|
40
|
+
gem 'json', '~> 1.4'
|
41
|
+
gem 'protected_attributes', '~> 1.0.6'
|
13
42
|
end
|
14
43
|
|
15
|
-
appraise '
|
44
|
+
appraise 'rails_5_0' do
|
16
45
|
instance_eval(&shared_dependencies)
|
17
|
-
|
46
|
+
|
47
|
+
gem 'rails', '~> 5.0.7'
|
48
|
+
gem 'rails-controller-testing', '>= 1.0.1'
|
49
|
+
gem 'puma', '~> 3.0'
|
50
|
+
gem 'sass-rails', '~> 5.0'
|
51
|
+
gem 'jquery-rails'
|
52
|
+
gem 'turbolinks', '~> 5'
|
53
|
+
gem 'jbuilder', '~> 2.5'
|
54
|
+
gem 'bcrypt', '~> 3.1.7'
|
55
|
+
gem 'listen', '~> 3.0.5'
|
56
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
57
|
+
end
|
58
|
+
|
59
|
+
appraise 'rails_5_1' do
|
60
|
+
instance_eval(&shared_dependencies)
|
61
|
+
gem 'rails', '~> 5.1.6'
|
62
|
+
gem 'rails-controller-testing', '>= 1.0.1'
|
63
|
+
gem 'puma', '~> 3.7'
|
64
|
+
gem 'sass-rails', '~> 5.0'
|
65
|
+
gem 'turbolinks', '~> 5'
|
66
|
+
gem 'jbuilder', '~> 2.5'
|
67
|
+
gem 'bcrypt', '~> 3.1.7'
|
68
|
+
gem 'capybara', '~> 2.13'
|
69
|
+
gem 'selenium-webdriver'
|
70
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
71
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
72
|
+
end
|
73
|
+
|
74
|
+
appraise 'rails_5_2' do
|
75
|
+
instance_eval(&shared_dependencies)
|
76
|
+
|
77
|
+
gem 'rails', '~> 5.2.2'
|
78
|
+
gem 'rails-controller-testing', '>= 1.0.1'
|
79
|
+
gem 'puma', '~> 3.11'
|
80
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
81
|
+
gem 'sass-rails', '~> 5.0'
|
82
|
+
gem 'turbolinks', '~> 5'
|
83
|
+
gem 'jbuilder', '~> 2.5'
|
84
|
+
gem 'bcrypt', '~> 3.1.7'
|
85
|
+
gem 'capybara', '~> 3.1.1'
|
86
|
+
gem 'selenium-webdriver'
|
87
|
+
gem 'chromedriver-helper'
|
88
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
89
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
90
|
+
end
|
91
|
+
|
92
|
+
if (
|
93
|
+
Gem::Requirement.new('>= 2.5.0').satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
94
|
+
)
|
95
|
+
appraise 'rails_6_0' do
|
96
|
+
instance_eval(&shared_dependencies)
|
97
|
+
|
98
|
+
gem 'rails', '~> 6.0.2'
|
99
|
+
gem 'puma', '~> 4.1'
|
100
|
+
gem 'sass-rails', '>= 6'
|
101
|
+
gem 'webpacker', '~> 4.0'
|
102
|
+
gem 'turbolinks', '~> 5'
|
103
|
+
gem 'jbuilder', '~> 2.7'
|
104
|
+
gem 'bcrypt', '~> 3.1.7'
|
105
|
+
gem 'bootsnap', '>= 1.4.2', require: false
|
106
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
107
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
108
|
+
gem 'capybara', '>= 2.15'
|
109
|
+
gem 'selenium-webdriver'
|
110
|
+
gem 'webdrivers'
|
111
|
+
|
112
|
+
# Other dependencies
|
113
|
+
gem 'rails-controller-testing', '>= 1.0.4'
|
114
|
+
gem 'pg', '~> 1.1', platform: :ruby
|
115
|
+
end
|
18
116
|
end
|
data/Gemfile
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
+
gemspec
|
4
|
+
|
3
5
|
gem 'appraisal', '~> 2.1'
|
4
|
-
gem '
|
5
|
-
gem '
|
6
|
-
gem 'pry-byebug'
|
7
|
-
gem 'sqlite3', '~> 1.3.11'
|
6
|
+
gem 'bundler', '~> 1.0'
|
7
|
+
gem 'm'
|
8
8
|
gem 'minitest', '~> 5.0'
|
9
9
|
gem 'minitest-reporters', '~> 1.0'
|
10
|
-
gem '
|
10
|
+
gem 'mry'
|
11
|
+
gem 'pry-byebug'
|
12
|
+
gem 'rubocop'
|
13
|
+
gem 'snowglobe'
|
14
|
+
gem 'warnings_logger'
|
data/README.md
CHANGED
@@ -1,26 +1,28 @@
|
|
1
|
-
# Shoulda [![Gem Version][version-badge]][rubygems] [![Build Status][travis-badge]][travis] ![Downloads][downloads-badge]
|
1
|
+
# Shoulda [![Gem Version][version-badge]][rubygems] [![Build Status][travis-badge]][travis] ![Downloads][downloads-badge] [![Hound][hound-badge]][hound]
|
2
2
|
|
3
3
|
[version-badge]: http://img.shields.io/gem/v/shoulda.svg
|
4
4
|
[rubygems]: http://rubygems.org/gems/shoulda
|
5
5
|
[travis-badge]: http://img.shields.io/travis/thoughtbot/shoulda/master.svg
|
6
6
|
[travis]: http://travis-ci.org/thoughtbot/shoulda
|
7
7
|
[downloads-badge]: http://img.shields.io/gem/dtv/shoulda.svg
|
8
|
+
[hound-badge]: https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg
|
9
|
+
[hound]: https://houndci.com
|
8
10
|
|
9
11
|
Shoulda helps you write more understandable, maintainable Rails-specific tests
|
10
|
-
|
12
|
+
under Minitest.
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
+
## Overview
|
15
|
+
|
16
|
+
As a meta gem, the `shoulda` gem doesn't contain any code of its own but rather
|
17
|
+
brings in behavior from two other gems:
|
14
18
|
|
15
19
|
* [Shoulda Context]
|
16
20
|
* [Shoulda Matchers]
|
17
21
|
|
18
|
-
See the READMEs for these projects for more information.
|
19
|
-
|
20
22
|
[Shoulda Context]: https://github.com/thoughtbot/shoulda-context
|
21
23
|
[Shoulda Matchers]: https://github.com/thoughtbot/shoulda-matchers
|
22
24
|
|
23
|
-
|
25
|
+
For instance:
|
24
26
|
|
25
27
|
```ruby
|
26
28
|
require "test_helper"
|
@@ -48,41 +50,46 @@ end
|
|
48
50
|
Here, the `context` and `should` methods come from Shoulda Context; matchers
|
49
51
|
(e.g. `have_many`, `allow_value`) come from Shoulda Matchers.
|
50
52
|
|
53
|
+
See the READMEs for these projects for more information.
|
54
|
+
|
51
55
|
## Compatibility
|
52
56
|
|
53
|
-
Shoulda is tested and supported against Ruby 2.
|
54
|
-
Minitest 5.
|
57
|
+
Shoulda Matchers is [tested][travis] and supported against Ruby 2.4+, Rails 5.x,
|
58
|
+
Rails 4.2.x, RSpec 3.x, and Minitest 5.x.
|
55
59
|
|
56
60
|
## Contributing
|
57
61
|
|
58
62
|
Shoulda is open source, and we are grateful for [everyone][contributors] who's
|
59
63
|
contributed so far.
|
60
64
|
|
65
|
+
[contributors]: https://github.com/thoughtbot/shoulda/contributors
|
66
|
+
|
61
67
|
If you'd like to contribute, please take a look at the
|
62
68
|
[instructions](CONTRIBUTING.md) for installing dependencies and crafting a good
|
63
69
|
pull request.
|
64
70
|
|
65
|
-
[contributors]: https://github.com/thoughtbot/shoulda/contributors
|
66
|
-
|
67
71
|
## Versioning
|
68
72
|
|
69
73
|
Shoulda follows Semantic Versioning 2.0 as defined at <http://semver.org>.
|
70
74
|
|
71
75
|
## License
|
72
76
|
|
73
|
-
Shoulda is copyright © 2006-
|
74
|
-
|
75
|
-
|
77
|
+
Shoulda is copyright © 2006-2019 thoughtbot, inc. It is free software, and may
|
78
|
+
be redistributed under the terms specified in the [MIT-LICENSE](MIT-LICENSE)
|
79
|
+
file.
|
76
80
|
|
77
81
|
## About thoughtbot
|
78
82
|
|
79
|
-
[
|
83
|
+
![thoughtbot][thoughtbot-logo]
|
84
|
+
|
85
|
+
[thoughtbot-logo]: https://thoughtbot.com/brand_assets/93:44.svg
|
80
86
|
|
81
87
|
Shoulda is maintained and funded by thoughtbot, inc. The names and logos for
|
82
88
|
thoughtbot are trademarks of thoughtbot, inc.
|
83
89
|
|
84
|
-
We
|
85
|
-
|
90
|
+
We love open source software! See [our other projects][community] or [hire
|
91
|
+
us][hire] to design, develop, and grow your product.
|
86
92
|
|
87
93
|
[community]: https://thoughtbot.com/community?utm_source=github
|
94
|
+
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
88
95
|
[thoughtbot]: https://thoughtbot.com?utm_source=github
|