Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ corundum/
.yardoc/
gh-pages/
tmp/
spec/examples.txt
.cadre/
errors.err
spec_help/cadre.rb
4 changes: 3 additions & 1 deletion .simplecov
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
require 'simplecov-json'
require 'cadre/simplecov'

SimpleCov.start do
coverage_dir "corundum/docs/coverage"
add_filter "./spec"
add_filter "vendor/bundle"
formatter SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::JSONFormatter
SimpleCov::Formatter::JSONFormatter,
Cadre::SimpleCov::VimFormatter
]
end
23 changes: 17 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
sudo: false
language: ruby
script: bundle exec rake ci
install: .travis-support/cached-bundle install --deployment
matrix:
include:
- gemfile: gemfiles/3.0
rvm: 1.9.3
- gemfile: gemfiles/3.1
rvm: 1.9.3
- gemfile: gemfiles/3.2
rvm: 1.9.3
- gemfile: gemfiles/3.3
rvm: 1.9.3


- gemfile: gemfiles/3.0
rvm: 2.0.0
- gemfile: gemfiles/3.1
rvm: 2.0.0
- gemfile: gemfiles/3.2
rvm: 2.0.0
- gemfile: gemfiles/3.3
rvm: 2.0.0


- gemfile: gemfiles/3.0
rvm: 2.1.2
- gemfile: gemfiles/3.1
rvm: 2.1.2
env:
global:
- CUSTOM_BUNDLE_PATH=gemfiles/vendor/bundle AMAZON_S3_BUCKET=lrd-travis-caching
- secure: b+5Ei+klIudmG+mWu2y6EgHZ/1GxOYX65jGskmQm85lahFUn9jVUn4IhDbERTmBGjjovZvAZ1cIzZg7hhOH2WRcWJX5My13KZv3hurz2jWeziIQp2LtURi7Ghah/1py+82oFTTQe/18A+ONGN7tksqAlWen/UOmfZzXpNPnyF9s=
- secure: FxV30BIED4dP/GkBGF8gtoWirzDzT0Gzn0GxocREp0BZAY9ti5YYoDQixPVCvtQCIKPUjUHnNd8KXdn0HtUhlgLhg7lEE03MoupsXoMZk8gNBeffcCRkzrpVBTmLEhdnoV3UNKpfn2+qCUSqqJimTarDe6k/7F5FzOl3R+xJgxw=
- gemfile: gemfiles/3.2
rvm: 2.1.2
- gemfile: gemfiles/3.3
rvm: 2.1.2

notifications:
flowdock:
secure: "iri0YRV17TZXSZ4IDGHd1e1k52u/Kz9EAqP4oGO1wI1OkIvD5t+2RvkSRoRNpQ080kzkjrlIQwpMaLMgUC9Y8TZ11JEq+uujmotRwOJIFtyAIbBwh3enQlOyPRU9kzdlmBHYtd7nLA92dd0PGfhoti2RkqUtqzgWAlZjqg/52zs="
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source "https://rubygems.org"

gem 'fuubar'
gem 'rspec', "~> 3.0.0"
gem 'cadre'

gemspec
145 changes: 91 additions & 54 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
PATH
remote: .
specs:
rspec-steps (1.0.7)
rspec-steps (2.0.0)
rspec (>= 3.0, < 3.99)

GEM
remote: https://rubygems.org/
specs:
activesupport (4.1.5)
i18n (~> 0.6, >= 0.6.9)
abstract_type (0.0.7)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.6)
adamantium (0.2.0)
ice_nine (~> 0.11.0)
memoizable (~> 0.4.0)
addressable (2.3.8)
arrayfields (4.9.2)
awesome_print (1.2.0)
ast (2.1.0)
cadre (1.0.1)
thor (>= 0.14, < 1.0)
tilt (> 1.0)
valise (~> 1.1.2)
calibrate (0.0.1)
caliph (0.3.1)
cane (2.6.2)
parallel
Expand All @@ -33,7 +42,10 @@ GEM
code_metrics (0.1.3)
coderay (1.1.0)
colored (1.2)
corundum (0.4.1)
concord (0.1.5)
adamantium (~> 0.2.0)
equalizer (~> 0.0.9)
corundum (0.6.0)
bundler
caliph (~> 0.3)
mattock (~> 0.9)
Expand All @@ -43,35 +55,44 @@ GEM
simplecov-json (>= 0.2)
diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.24)
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.11)
erubis (2.7.0)
fattr (2.2.2)
flay (2.5.0)
flay (2.6.1)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
flog (4.3.0)
flog (4.3.2)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.4)
fuubar (2.0.0)
rspec (~> 3.0)
ruby-progressbar (~> 1.4)
hirb (0.7.2)
i18n (0.6.11)
json (1.8.1)
json_pure (1.8.1)
launchy (2.4.2)
hirb (0.7.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
ice_nine (0.11.1)
json (1.8.3)
json_pure (1.8.2)
launchy (2.4.3)
addressable (~> 2.3)
main (6.0.0)
main (6.1.0)
arrayfields (>= 4.7.4)
chronic (>= 0.6.2)
fattr (>= 2.2.0)
map (>= 5.1.0)
map (6.5.4)
mattock (0.9.0)
map (6.5.5)
mattock (0.10.0)
calibrate (~> 0.0.1)
caliph (~> 0.3.1)
rake (~> 10.0)
tilt (> 0)
valise (~> 1.1.1)
metric_fu (4.11.1)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
metric_fu (4.11.4)
cane (~> 2.5, >= 2.5.2)
churn (~> 0.0.35)
code_metrics (~> 0.1)
Expand All @@ -86,15 +107,17 @@ GEM
reek (~> 1.3, >= 1.3.4)
roodi (~> 3.1)
metric_fu-Saikuro (1.1.3)
mime-types (2.3)
minitest (5.4.0)
multi_json (1.10.1)
netrc (0.7.7)
mime-types (2.6.2)
minitest (5.8.0)
multi_json (1.11.2)
netrc (0.10.3)
paint (0.8.7)
parallel (1.2.4)
rails_best_practices (1.15.4)
parallel (1.6.1)
parser (2.2.2.6)
ast (>= 1.1, < 3.0)
procto (0.0.2)
rails_best_practices (1.15.7)
activesupport
awesome_print
code_analyzer (>= 0.4.3)
colored
erubis
Expand All @@ -103,57 +126,71 @@ GEM
require_all
ruby-progressbar
rainbow (2.0.0)
rake (10.3.2)
rake (10.4.2)
redcard (1.1.0)
reek (1.3.8)
reek (1.6.6)
parser (~> 2.2.0.pre.7)
rainbow (>= 1.99, < 3.0)
ruby2ruby (>= 2.0.8, < 3.0)
ruby_parser (~> 3.3)
sexp_processor
unparser (~> 0.2.2)
require_all (1.3.2)
rest-client (1.7.2)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
roodi (3.3.1)
ruby_parser (~> 3.2, >= 3.2.2)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.4)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
ruby-progressbar (1.7.0)
ruby2ruby (2.1.1)
ruby_parser (~> 3.1)
sexp_processor (~> 4.0)
ruby_parser (3.6.2)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.4)
rspec-support (~> 3.0.0)
rspec-support (3.0.4)
ruby-progressbar (1.7.5)
ruby_parser (3.7.1)
sexp_processor (~> 4.1)
sexp_processor (4.4.4)
simplecov (0.9.0)
sexp_processor (4.6.0)
simplecov (0.10.0)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
simplecov-json (0.2)
json
simplecov
thread_safe (0.3.4)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
valise (1.1.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
unparser (0.2.4)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
concord (~> 0.1.5)
diff-lcs (~> 1.2.5)
equalizer (~> 0.0.9)
parser (~> 2.2.2)
procto (~> 0.0.2)
valise (1.1.4)

PLATFORMS
ruby

DEPENDENCIES
cadre
corundum (>= 0.4.0)
fuubar
metric_fu (~> 4.11.1)
rspec (~> 3.0.0)
rspec-steps!

BUNDLED WITH
1.10.6
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Corundum
rspec.files_to_run = "spec"
end
SimpleCov.new(tk, rspec) do |cov|
cov.threshold = 74
cov.threshold = 93
end
gem = GemBuilding.new(tk)
GemCutter.new(tk,gem)
Expand Down
28 changes: 16 additions & 12 deletions doc/README
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ almost all cases. BUT, that complete separation of examples really sucks when
you're trying to write long stories involving many requests. You are usually
stuck with three choices:

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

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

## Caveats and cautions

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

Any call to "before" inside a steps block is treated like before(:all) and is run only
once before the first step. Or perhaps more accurately, any call to before() is treated
like before(:each) ... but for these purposes the entire steps block is treated like a
single example.
If you're using RSpec-Steps with Rails (for instance, with Capybara), you will
absolutely need to make sure you have transactional fixtures off. Otherwise,
you'll experience problems where the tests and the application appear to see
completely different databases.

While Steps 2.0 retains it's shift in lifecycle hooks (:each become :all,
there's a :step hook), this shift *no longer* applies to config.before _et al_
-- you'll need to use config.before :each to run around each step. This is the
primary change to the Steps interface that called for a major version bump.

## Advanced stuff: shared steps

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

## Versions and Dependencies

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

We make good use of Travis to check compatibility, however. You can check what
versions of RSpec and Ruby RSpec-Steps works with here:
Expand Down
1 change: 1 addition & 0 deletions gemfiles/3.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source "https://rubygems.org"

gem "rspec", "~> 3.0.0"
gem 'cadre'

gemspec :path => ".."
Loading