Skip to content

Commit a60adc9

Browse files
authored
Merge pull request #2071 from rspec/4-0-dev
Long running 4.0 development branch
2 parents 33ab374 + 6728e9d commit a60adc9

File tree

78 files changed

+2469
-414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2469
-414
lines changed

.rubocop.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,30 @@ PerlBackrefs:
4343
# We probably can refactor the backref out, but for now excluding it since
4444
# we can't use named matches in 1.8.7
4545
- lib/generators/rspec/scaffold/scaffold_generator.rb
46+
47+
Style/AccessModifierDeclarations:
48+
Enabled: false
49+
50+
Naming/MemoizedInstanceVariableName:
51+
Enabled: false
52+
53+
Naming/UncommunicativeMethodParamName:
54+
Enabled: false
55+
56+
Metrics/PerceivedComplexity:
57+
Enabled: false
58+
59+
Metrics/BlockLength:
60+
Enabled: false
61+
62+
Lint/AssignmentInCondition:
63+
Enabled: false
64+
65+
Lint/EmptyExpression:
66+
Enabled: false
67+
68+
Layout/AlignHash:
69+
Enabled: false
70+
71+
Naming/RescuedExceptionsVariableName:
72+
Enabled: false

.rubocop_rspec_base.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CaseEquality:
2222
Enabled: false
2323

2424
# Warns when the class is excessively long.
25-
ClassLength:
25+
Metrics/ClassLength:
2626
Max: 100
2727

2828
CollectionMethods:
@@ -66,7 +66,7 @@ LineLength:
6666
Max: 100
6767

6868
# Over time we'd like to get this down, but this is what we're at now.
69-
MethodLength:
69+
Metrics/MethodLength:
7070
Max: 15
7171

7272
# Who cares what we call the argument for binary operator methods?
@@ -115,7 +115,10 @@ StringLiterals:
115115
Style/SpecialGlobalVars:
116116
Enabled: false
117117

118-
Style/TrailingCommaInLiteral:
118+
Style/TrailingCommaInArrayLiteral:
119+
Enabled: false
120+
121+
Style/TrailingCommaInHashLiteral:
119122
Enabled: false
120123

121124
Style/TrailingCommaInArguments:
@@ -132,7 +135,7 @@ Style/ParallelAssignment:
132135
Layout/EmptyLineBetweenDefs:
133136
Enabled: false
134137

135-
Layout/FirstParameterIndentation:
138+
Layout/IndentFirstArgument:
136139
Enabled: false
137140

138141
Naming/ConstantName:
@@ -150,6 +153,9 @@ Style/EmptyMethod:
150153
Style/FormatStringToken:
151154
Enabled: false
152155

156+
Style/FrozenStringLiteralComment:
157+
Enabled: false
158+
153159
Style/GuardClause:
154160
Enabled: false
155161

@@ -162,7 +168,10 @@ Style/IfUnlessModifier:
162168
Style/IfUnlessModifierOfIfUnless:
163169
Enabled: false
164170

165-
Style/MethodMissing:
171+
Style/MethodMissingSuper:
172+
Enabled: false
173+
174+
Style/MissingRespondToMissing:
166175
Enabled: false
167176

168177
Style/MixinUsage:
@@ -243,18 +252,13 @@ Style/StderrPuts:
243252
Style/TernaryParentheses:
244253
Enabled: false
245254

246-
# This could likely be enabled, but it had a false positive on rspec-mocks
247-
# (suggested change was not behaviour preserving) so I don't trust it.
248-
Performance/HashEachMethods:
249-
Enabled: false
250-
251255
Naming/HeredocDelimiterNaming:
252256
Enabled: false
253257

254258
Layout/EmptyLineAfterMagicComment:
255259
Enabled: false
256260

257-
Layout/IndentArray:
261+
Layout/IndentFirstArrayElement:
258262
Enabled: false
259263

260264
Layout/IndentAssignment:
@@ -307,3 +311,6 @@ Style/TrailingUnderscoreVariable:
307311

308312
Layout/EmptyLinesAroundAccessModifier:
309313
Enabled: false
314+
315+
Metrics/AbcSize:
316+
Enabled: false

.travis.yml

Lines changed: 30 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -37,180 +37,64 @@ dist: trusty
3737

3838
matrix:
3939
include:
40-
# Rails dev / 6 builds >= 2.4.4
40+
# Rails 6 builds
41+
- rvm: jruby-head
42+
jdk: oraclejdk11
43+
env:
44+
- RAILS_VERSION='~>6.0'
45+
- JRUBY_OPT=--dev
46+
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
4147
- rvm: 2.6.3
42-
env: RAILS_VERSION=master
43-
- rvm: 2.5.3
44-
env: RAILS_VERSION=master
45-
- rvm: 2.4.4
46-
env: RAILS_VERSION=master
48+
env: RAILS_VERSION='~>6.0'
49+
- rvm: 2.5.5
50+
env: RAILS_VERSION='~>6.0'
4751

4852
# Rails 5.2 builds >= 2.2.2
53+
- rvm: jruby-head
54+
jdk: oraclejdk11
55+
env:
56+
- RAILS_VERSION='~> 5.2.0'
57+
- JRUBY_OPT=--dev
58+
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
4959
- rvm: 2.6.3
5060
env: RAILS_VERSION='~> 5.2.0'
51-
- rvm: 2.5.3
61+
- rvm: 2.5.5
5262
env: RAILS_VERSION='~> 5.2.0'
53-
- rvm: 2.4.4
63+
- rvm: 2.4.6
5464
env: RAILS_VERSION='~> 5.2.0'
55-
- rvm: 2.3.7
56-
env: RAILS_VERSION='~> 5.2.0'
57-
- rvm: 2.2.10
65+
- rvm: 2.3.8
5866
env: RAILS_VERSION='~> 5.2.0'
5967

6068
# Rails 5.1 Builds >= 2.2.2
6169
- rvm: 2.6.3
6270
env: RAILS_VERSION='~> 5.1.0'
63-
- rvm: 2.5.3
64-
env: RAILS_VERSION='~> 5.1.0'
65-
- rvm: 2.4.4
71+
- rvm: 2.5.5
6672
env: RAILS_VERSION='~> 5.1.0'
67-
- rvm: 2.3.7
73+
- rvm: 2.4.6
6874
env: RAILS_VERSION='~> 5.1.0'
69-
- rvm: 2.2.10
75+
- rvm: 2.3.8
7076
env: RAILS_VERSION='~> 5.1.0'
7177

7278
# Rails 5.0 Builds >= 2.2.2
7379
- rvm: 2.6.3
7480
env: RAILS_VERSION='~> 5.0.0'
75-
- rvm: 2.5.3
76-
env: RAILS_VERSION='~> 5.0.0'
77-
- rvm: 2.4.4
81+
- rvm: 2.5.5
7882
env: RAILS_VERSION='~> 5.0.0'
79-
- rvm: 2.3.7
83+
- rvm: 2.4.6
8084
env: RAILS_VERSION='~> 5.0.0'
81-
- rvm: 2.2.10
85+
- rvm: 2.3.8
8286
env: RAILS_VERSION='~> 5.0.0'
8387

8488
# Rails 4.2 Builds >= 1.9.3
85-
- rvm: 2.4.4
89+
- rvm: 2.5.5
8690
env: RAILS_VERSION='~> 4.2.0'
87-
- rvm: 2.4.4
88-
env: RAILS_VERSION=4-2-stable
89-
- rvm: 2.3.7
91+
- rvm: 2.4.6
9092
env: RAILS_VERSION='~> 4.2.0'
91-
- rvm: 2.3.7
92-
env: RAILS_VERSION=4-2-stable
93-
- rvm: 2.2.10
93+
- rvm: 2.4.6
9494
env: RAILS_VERSION='~> 4.2.0'
95-
- rvm: 2.2.10
96-
env: RAILS_VERSION=4-2-stable
97-
- rvm: 2.1.10
95+
- rvm: 2.3.8
9896
env: RAILS_VERSION='~> 4.2.0'
99-
- rvm: 2.1.10
100-
env: RAILS_VERSION=4-2-stable
101-
- rvm: 2.0.0
97+
- rvm: 2.3.8
10298
env: RAILS_VERSION='~> 4.2.0'
103-
- rvm: 2.0.0
104-
env: RAILS_VERSION=4-2-stable
105-
- rvm: 1.9.3
106-
env: RAILS_VERSION='~> 4.2.0'
107-
- rvm: 1.9.3
108-
env: RAILS_VERSION=4-2-stable
109-
110-
# Rails 4.1 Builds >= 1.9.3, < 2.4
111-
- rvm: 2.3.7
112-
env: RAILS_VERSION='~> 4.1.0'
113-
- rvm: 2.3.7
114-
env: RAILS_VERSION=4-1-stable
115-
- rvm: 2.2.10
116-
env: RAILS_VERSION='~> 4.1.0'
117-
- rvm: 2.2.10
118-
env: RAILS_VERSION=4-1-stable
119-
- rvm: 2.1.10
120-
env: RAILS_VERSION='~> 4.1.0'
121-
- rvm: 2.1.10
122-
env: RAILS_VERSION=4-1-stable
123-
- rvm: 2.0.0
124-
env: RAILS_VERSION='~> 4.1.0'
125-
- rvm: 2.0.0
126-
env: RAILS_VERSION=4-1-stable
127-
- rvm: 1.9.3
128-
env: RAILS_VERSION='~> 4.1.0'
129-
- rvm: 1.9.3
130-
env: RAILS_VERSION=4-1-stable
131-
132-
# Rails 4.0 Builds >= 1.8.11, < 2.4
133-
- rvm: 2.3.7
134-
env: RAILS_VERSION='~> 4.0.4'
135-
- rvm: 2.3.7
136-
env: RAILS_VERSION=4-0-stable
137-
- rvm: 2.2.10
138-
env: RAILS_VERSION='~> 4.0.4'
139-
- rvm: 2.2.10
140-
env: RAILS_VERSION=4-0-stable
141-
- rvm: 2.1.10
142-
env: RAILS_VERSION='~> 4.0.4'
143-
- rvm: 2.1.10
144-
env: RAILS_VERSION=4-0-stable
145-
- rvm: 2.0.0
146-
env: RAILS_VERSION='~> 4.0.4'
147-
- rvm: 2.0.0
148-
env: RAILS_VERSION=4-0-stable
149-
- rvm: 1.9.3
150-
env: RAILS_VERSION='~> 4.0.4'
151-
- rvm: 1.9.3
152-
env: RAILS_VERSION=4-0-stable
15399

154-
# Rails 3.2 Builds < 2.4
155-
- rvm: 2.3.7
156-
env: RAILS_VERSION='~> 3.2.17'
157-
- rvm: 2.3.7
158-
env: RAILS_VERSION=3-2-stable
159-
- rvm: 2.2.10
160-
env: RAILS_VERSION='~> 3.2.17'
161-
- rvm: 2.2.10
162-
env: RAILS_VERSION=3-2-stable
163-
- rvm: 2.1.10
164-
env: RAILS_VERSION='~> 3.2.17'
165-
- rvm: 2.1.10
166-
env: RAILS_VERSION=3-2-stable
167-
- rvm: 2.0.0
168-
env: RAILS_VERSION='~> 3.2.17'
169-
- rvm: 2.0.0
170-
env: RAILS_VERSION=3-2-stable
171-
- rvm: 1.9.3
172-
env: RAILS_VERSION='~> 3.2.17'
173-
- rvm: 1.9.3
174-
env: RAILS_VERSION=3-2-stable
175-
- rvm: 1.9.2
176-
env: RAILS_VERSION='~> 3.2.17'
177-
- rvm: 1.9.2
178-
env: RAILS_VERSION=3-2-stable
179-
- rvm: 1.8.7
180-
env: RAILS_VERSION='~> 3.2.17'
181-
- rvm: 1.8.7
182-
env: RAILS_VERSION=3-2-stable
183-
184-
# Rails 3.1 Builds, < 2.2
185-
- rvm: 2.1.10
186-
env: RAILS_VERSION='~> 3.1.12'
187-
- rvm: 2.0.0
188-
env: RAILS_VERSION='~> 3.1.12'
189-
- rvm: 1.9.3
190-
env: RAILS_VERSION='~> 3.1.12'
191-
- rvm: 1.9.2
192-
env: RAILS_VERSION='~> 3.1.12'
193-
- rvm: 1.8.7
194-
env: RAILS_VERSION='~> 3.1.12'
195-
196-
# Rails 3.0 Builds, < 2
197-
- rvm: 1.9.3
198-
env: RAILS_VERSION='~> 3.0.20'
199-
- rvm: 1.9.2
200-
env: RAILS_VERSION='~> 3.0.20'
201-
- rvm: 1.8.7
202-
env: RAILS_VERSION='~> 3.0.20'
203-
204-
allow_failures:
205-
- rvm: 2.6.3
206-
env: RAILS_VERSION=master
207-
- rvm: 2.5.3
208-
env: RAILS_VERSION=master
209-
- rvm: 2.4.4
210-
env: RAILS_VERSION=master
211100
fast_finish: true
212-
213-
branches:
214-
only:
215-
- master
216-
- /^\d+-\d+-maintenance$/

BUILD_DETAIL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $ bin/cucumber
6868

6969
## YARD documentation
7070

71-
RSpec uses [YARD](https://yardoc.org/) for API documentation on the [rspec.info site](http://rspec.info/).
71+
RSpec uses [YARD](https://yardoc.org/) for API documentation on the [rspec.info site](https://rspec.info/).
7272
Our commitment to [SemVer](https://semver.org) requires that we explicitly
7373
declare our public API, and our build uses YARD to ensure that every
7474
class, module and method has either been labeled `@private` or has at

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,21 @@ immediately. These are good ones to tackle to help us actively fix bugs.
5050
Maintenance branches are how we manage the different supported point releases
5151
of RSpec. As such, while they might look like good candidates to merge into
5252
master, please do not open pull requests to merge them.
53+
54+
## How do the cukes work?
55+
56+
The cucumber features for RSpec rails document how it works, but are also quasi
57+
executable tests for the framework. They execute in the context of a pre-setup
58+
Rails app.
59+
60+
1. Before the cucumber specs run, the directory `tmp/aruba` is cleared
61+
2. If the example app hasn't already been created,
62+
`bundle exec rake generate:app generate:stuff` is executed.
63+
3. The example app is copied in to `tmp/aruba`
64+
4. Everything in `tmp/aruba/spec/*` is deleted apart from `spec/spec_helper.rb` and
65+
`spec/rails_helper.rb`
66+
5. the cucumber suite executes, creating files in that app and executing them
67+
68+
The best way to debug the app is to run a failing cucumber feature, which will
69+
leave the test files intact in `tmp/aruba`, then you can cd in to that director
70+
and run it in the bundle context of the aruba app.

0 commit comments

Comments
 (0)