Skip to content

Commit 0686223

Browse files
committed
Merge pull request #20 from LRDesign/compatible_version
Complete overall avoids touching RSpec innards
2 parents b27c361 + 7b5bc59 commit 0686223

34 files changed

+1053
-525
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ corundum/
1212
.yardoc/
1313
gh-pages/
1414
tmp/
15+
spec/examples.txt
16+
.cadre/
17+
errors.err
18+
spec_help/cadre.rb

.simplecov

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
require 'simplecov-json'
2+
require 'cadre/simplecov'
23

34
SimpleCov.start do
45
coverage_dir "corundum/docs/coverage"
56
add_filter "./spec"
67
add_filter "vendor/bundle"
78
formatter SimpleCov::Formatter::MultiFormatter[
89
SimpleCov::Formatter::HTMLFormatter,
9-
SimpleCov::Formatter::JSONFormatter
10+
SimpleCov::Formatter::JSONFormatter,
11+
Cadre::SimpleCov::VimFormatter
1012
]
1113
end

.travis.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
1+
sudo: false
12
language: ruby
23
script: bundle exec rake ci
3-
install: .travis-support/cached-bundle install --deployment
44
matrix:
55
include:
66
- gemfile: gemfiles/3.0
77
rvm: 1.9.3
88
- gemfile: gemfiles/3.1
99
rvm: 1.9.3
10+
- gemfile: gemfiles/3.2
11+
rvm: 1.9.3
12+
- gemfile: gemfiles/3.3
13+
rvm: 1.9.3
1014

1115

1216
- gemfile: gemfiles/3.0
1317
rvm: 2.0.0
1418
- gemfile: gemfiles/3.1
1519
rvm: 2.0.0
20+
- gemfile: gemfiles/3.2
21+
rvm: 2.0.0
22+
- gemfile: gemfiles/3.3
23+
rvm: 2.0.0
1624

1725

1826
- gemfile: gemfiles/3.0
1927
rvm: 2.1.2
2028
- gemfile: gemfiles/3.1
2129
rvm: 2.1.2
22-
env:
23-
global:
24-
- CUSTOM_BUNDLE_PATH=gemfiles/vendor/bundle AMAZON_S3_BUCKET=lrd-travis-caching
25-
- secure: b+5Ei+klIudmG+mWu2y6EgHZ/1GxOYX65jGskmQm85lahFUn9jVUn4IhDbERTmBGjjovZvAZ1cIzZg7hhOH2WRcWJX5My13KZv3hurz2jWeziIQp2LtURi7Ghah/1py+82oFTTQe/18A+ONGN7tksqAlWen/UOmfZzXpNPnyF9s=
26-
- secure: FxV30BIED4dP/GkBGF8gtoWirzDzT0Gzn0GxocREp0BZAY9ti5YYoDQixPVCvtQCIKPUjUHnNd8KXdn0HtUhlgLhg7lEE03MoupsXoMZk8gNBeffcCRkzrpVBTmLEhdnoV3UNKpfn2+qCUSqqJimTarDe6k/7F5FzOl3R+xJgxw=
30+
- gemfile: gemfiles/3.2
31+
rvm: 2.1.2
32+
- gemfile: gemfiles/3.3
33+
rvm: 2.1.2
34+
35+
notifications:
36+
flowdock:
37+
secure: "iri0YRV17TZXSZ4IDGHd1e1k52u/Kz9EAqP4oGO1wI1OkIvD5t+2RvkSRoRNpQ080kzkjrlIQwpMaLMgUC9Y8TZ11JEq+uujmotRwOJIFtyAIbBwh3enQlOyPRU9kzdlmBHYtd7nLA92dd0PGfhoti2RkqUtqzgWAlZjqg/52zs="

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
source "https://rubygems.org"
22

33
gem 'fuubar'
4+
gem 'rspec', "~> 3.0.0"
5+
gem 'cadre'
46

57
gemspec

Gemfile.lock

Lines changed: 91 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
PATH
22
remote: .
33
specs:
4-
rspec-steps (1.0.7)
4+
rspec-steps (2.0.0)
55
rspec (>= 3.0, < 3.99)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
activesupport (4.1.5)
11-
i18n (~> 0.6, >= 0.6.9)
10+
abstract_type (0.0.7)
11+
activesupport (4.2.4)
12+
i18n (~> 0.7)
1213
json (~> 1.7, >= 1.7.7)
1314
minitest (~> 5.1)
14-
thread_safe (~> 0.1)
15+
thread_safe (~> 0.3, >= 0.3.4)
1516
tzinfo (~> 1.1)
16-
addressable (2.3.6)
17+
adamantium (0.2.0)
18+
ice_nine (~> 0.11.0)
19+
memoizable (~> 0.4.0)
20+
addressable (2.3.8)
1721
arrayfields (4.9.2)
18-
awesome_print (1.2.0)
22+
ast (2.1.0)
23+
cadre (1.0.1)
24+
thor (>= 0.14, < 1.0)
25+
tilt (> 1.0)
26+
valise (~> 1.1.2)
27+
calibrate (0.0.1)
1928
caliph (0.3.1)
2029
cane (2.6.2)
2130
parallel
@@ -33,7 +42,10 @@ GEM
3342
code_metrics (0.1.3)
3443
coderay (1.1.0)
3544
colored (1.2)
36-
corundum (0.4.1)
45+
concord (0.1.5)
46+
adamantium (~> 0.2.0)
47+
equalizer (~> 0.0.9)
48+
corundum (0.6.0)
3749
bundler
3850
caliph (~> 0.3)
3951
mattock (~> 0.9)
@@ -43,35 +55,44 @@ GEM
4355
simplecov-json (>= 0.2)
4456
diff-lcs (1.2.5)
4557
docile (1.1.5)
58+
domain_name (0.5.24)
59+
unf (>= 0.0.5, < 1.0.0)
60+
equalizer (0.0.11)
4661
erubis (2.7.0)
4762
fattr (2.2.2)
48-
flay (2.5.0)
63+
flay (2.6.1)
4964
ruby_parser (~> 3.0)
5065
sexp_processor (~> 4.0)
51-
flog (4.3.0)
66+
flog (4.3.2)
5267
ruby_parser (~> 3.1, > 3.1.0)
5368
sexp_processor (~> 4.4)
5469
fuubar (2.0.0)
5570
rspec (~> 3.0)
5671
ruby-progressbar (~> 1.4)
57-
hirb (0.7.2)
58-
i18n (0.6.11)
59-
json (1.8.1)
60-
json_pure (1.8.1)
61-
launchy (2.4.2)
72+
hirb (0.7.3)
73+
http-cookie (1.0.2)
74+
domain_name (~> 0.5)
75+
i18n (0.7.0)
76+
ice_nine (0.11.1)
77+
json (1.8.3)
78+
json_pure (1.8.2)
79+
launchy (2.4.3)
6280
addressable (~> 2.3)
63-
main (6.0.0)
81+
main (6.1.0)
6482
arrayfields (>= 4.7.4)
6583
chronic (>= 0.6.2)
6684
fattr (>= 2.2.0)
6785
map (>= 5.1.0)
68-
map (6.5.4)
69-
mattock (0.9.0)
86+
map (6.5.5)
87+
mattock (0.10.0)
88+
calibrate (~> 0.0.1)
7089
caliph (~> 0.3.1)
7190
rake (~> 10.0)
7291
tilt (> 0)
7392
valise (~> 1.1.1)
74-
metric_fu (4.11.1)
93+
memoizable (0.4.2)
94+
thread_safe (~> 0.3, >= 0.3.1)
95+
metric_fu (4.11.4)
7596
cane (~> 2.5, >= 2.5.2)
7697
churn (~> 0.0.35)
7798
code_metrics (~> 0.1)
@@ -86,15 +107,17 @@ GEM
86107
reek (~> 1.3, >= 1.3.4)
87108
roodi (~> 3.1)
88109
metric_fu-Saikuro (1.1.3)
89-
mime-types (2.3)
90-
minitest (5.4.0)
91-
multi_json (1.10.1)
92-
netrc (0.7.7)
110+
mime-types (2.6.2)
111+
minitest (5.8.0)
112+
multi_json (1.11.2)
113+
netrc (0.10.3)
93114
paint (0.8.7)
94-
parallel (1.2.4)
95-
rails_best_practices (1.15.4)
115+
parallel (1.6.1)
116+
parser (2.2.2.6)
117+
ast (>= 1.1, < 3.0)
118+
procto (0.0.2)
119+
rails_best_practices (1.15.7)
96120
activesupport
97-
awesome_print
98121
code_analyzer (>= 0.4.3)
99122
colored
100123
erubis
@@ -103,57 +126,71 @@ GEM
103126
require_all
104127
ruby-progressbar
105128
rainbow (2.0.0)
106-
rake (10.3.2)
129+
rake (10.4.2)
107130
redcard (1.1.0)
108-
reek (1.3.8)
131+
reek (1.6.6)
132+
parser (~> 2.2.0.pre.7)
109133
rainbow (>= 1.99, < 3.0)
110-
ruby2ruby (>= 2.0.8, < 3.0)
111-
ruby_parser (~> 3.3)
112-
sexp_processor
134+
unparser (~> 0.2.2)
113135
require_all (1.3.2)
114-
rest-client (1.7.2)
136+
rest-client (1.8.0)
137+
http-cookie (>= 1.0.2, < 2.0)
115138
mime-types (>= 1.16, < 3.0)
116139
netrc (~> 0.7)
117140
roodi (3.3.1)
118141
ruby_parser (~> 3.2, >= 3.2.2)
119-
rspec (3.1.0)
120-
rspec-core (~> 3.1.0)
121-
rspec-expectations (~> 3.1.0)
122-
rspec-mocks (~> 3.1.0)
123-
rspec-core (3.1.7)
124-
rspec-support (~> 3.1.0)
125-
rspec-expectations (3.1.2)
142+
rspec (3.0.0)
143+
rspec-core (~> 3.0.0)
144+
rspec-expectations (~> 3.0.0)
145+
rspec-mocks (~> 3.0.0)
146+
rspec-core (3.0.4)
147+
rspec-support (~> 3.0.0)
148+
rspec-expectations (3.0.4)
126149
diff-lcs (>= 1.2.0, < 2.0)
127-
rspec-support (~> 3.1.0)
128-
rspec-mocks (3.1.3)
129-
rspec-support (~> 3.1.0)
130-
rspec-support (3.1.2)
131-
ruby-progressbar (1.7.0)
132-
ruby2ruby (2.1.1)
133-
ruby_parser (~> 3.1)
134-
sexp_processor (~> 4.0)
135-
ruby_parser (3.6.2)
150+
rspec-support (~> 3.0.0)
151+
rspec-mocks (3.0.4)
152+
rspec-support (~> 3.0.0)
153+
rspec-support (3.0.4)
154+
ruby-progressbar (1.7.5)
155+
ruby_parser (3.7.1)
136156
sexp_processor (~> 4.1)
137-
sexp_processor (4.4.4)
138-
simplecov (0.9.0)
157+
sexp_processor (4.6.0)
158+
simplecov (0.10.0)
139159
docile (~> 1.1.0)
140-
multi_json
141-
simplecov-html (~> 0.8.0)
142-
simplecov-html (0.8.0)
160+
json (~> 1.8)
161+
simplecov-html (~> 0.10.0)
162+
simplecov-html (0.10.0)
143163
simplecov-json (0.2)
144164
json
145165
simplecov
146-
thread_safe (0.3.4)
166+
thor (0.19.1)
167+
thread_safe (0.3.5)
147168
tilt (2.0.1)
148169
tzinfo (1.2.2)
149170
thread_safe (~> 0.1)
150-
valise (1.1.1)
171+
unf (0.1.4)
172+
unf_ext
173+
unf_ext (0.0.7.1)
174+
unparser (0.2.4)
175+
abstract_type (~> 0.0.7)
176+
adamantium (~> 0.2.0)
177+
concord (~> 0.1.5)
178+
diff-lcs (~> 1.2.5)
179+
equalizer (~> 0.0.9)
180+
parser (~> 2.2.2)
181+
procto (~> 0.0.2)
182+
valise (1.1.4)
151183

152184
PLATFORMS
153185
ruby
154186

155187
DEPENDENCIES
188+
cadre
156189
corundum (>= 0.4.0)
157190
fuubar
158191
metric_fu (~> 4.11.1)
192+
rspec (~> 3.0.0)
159193
rspec-steps!
194+
195+
BUNDLED WITH
196+
1.10.6

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module Corundum
2020
rspec.files_to_run = "spec"
2121
end
2222
SimpleCov.new(tk, rspec) do |cov|
23-
cov.threshold = 74
23+
cov.threshold = 93
2424
end
2525
gem = GemBuilding.new(tk)
2626
GemCutter.new(tk,gem)

doc/README

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ almost all cases. BUT, that complete separation of examples really sucks when
5656
you're trying to write long stories involving many requests. You are usually
5757
stuck with three choices:
5858

59-
1. Write a sequence of examples, each of which repeats the behavior of all previous examples. Downside: horrendously inefficient.
60-
2. Write a single huge example which performs the entire story. Downside: only one description, no independent reporting of the steps of the story.
59+
1. Write a sequence of examples, each of which repeats the behavior of all
60+
previous examples. Downside: horrendously inefficient.
61+
2. Write a single huge example which performs the entire story. Downside: only
62+
one description, no independent reporting of the steps of the story.
6163
3. Use Cucumber. Downside: We agree totally with this guy: http://bit.ly/dmXqnY
6264

6365
RSpec-steps intentionally breaks RSpec's "independent" philosophy to let us get the
@@ -66,14 +68,17 @@ and skip subsequent steps after a failure.
6668

6769
## Caveats and cautions
6870

69-
Don't call "describe" inside of "steps". The behavior is undefined and probably bad. It's
70-
hard to imagine what this should actually mean in any case. Future versions of rspec-steps
71-
will consider this an error.
71+
Don't call "describe" inside of "steps". As of 2.0, this is an error.
7272

73-
Any call to "before" inside a steps block is treated like before(:all) and is run only
74-
once before the first step. Or perhaps more accurately, any call to before() is treated
75-
like before(:each) ... but for these purposes the entire steps block is treated like a
76-
single example.
73+
If you're using RSpec-Steps with Rails (for instance, with Capybara), you will
74+
absolutely need to make sure you have transactional fixtures off. Otherwise,
75+
you'll experience problems where the tests and the application appear to see
76+
completely different databases.
77+
78+
While Steps 2.0 retains it's shift in lifecycle hooks (:each become :all,
79+
there's a :step hook), this shift *no longer* applies to config.before _et al_
80+
-- you'll need to use config.before :each to run around each step. This is the
81+
primary change to the Steps interface that called for a major version bump.
7782

7883
## Advanced stuff: shared steps
7984

@@ -110,9 +115,8 @@ diverge, you can DRY your code out with shared_steps blocks, like so:
110115

111116
## Versions and Dependencies
112117

113-
The goal (sadly unfulfilled) is to try to be compatible with as many versions
114-
of RSpec 3.x as possible. Frankly, Rspec-Steps is more than a little bit of a
115-
hack, and intrudes wholesale on RSpec's private interfaces.
118+
The goal is to try to be compatible with as many versions
119+
of RSpec 3.x as possible.
116120

117121
We make good use of Travis to check compatibility, however. You can check what
118122
versions of RSpec and Ruby RSpec-Steps works with here:

gemfiles/3.0

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
source "https://rubygems.org"
22

33
gem "rspec", "~> 3.0.0"
4+
gem 'cadre'
45

56
gemspec :path => ".."

0 commit comments

Comments
 (0)