Skip to content

Instantly share code, notes, and snippets.

@johnsyweb
Created October 10, 2018 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnsyweb/35650b552aee025808a629c003c45f92 to your computer and use it in GitHub Desktop.
Save johnsyweb/35650b552aee025808a629c003c45f92 to your computer and use it in GitHub Desktop.
Sample Cucumber Failure...
% git reset --hard origin/master && rbenv version && bundle exec cucumber --version && bundle exec cucumber features/built_in_matchers/all.feature:21
HEAD is now at 00252315 Merge 3-8-maintenance
2.5.1 (set by RBENV_VERSION environment variable)
1.3.20
/opt/rubies/2.5.1/lib/ruby/gems/2.5.0/gems/gherkin-2.12.2/lib/gherkin/formatter/filter_formatter.rb:105: warning: constant ::Fixnum is deprecated
Using the default profile...
..F
(::) failed steps (::)
expected "\n[1, 3, 5]\n should all be odd\n should all be a kind of Integer\n should all be < 10\n should ...ilure\n\nFailed examples:\n\nrspec ./array_all_matcher_spec.rb:7 # [1, 3, 5] should all be even\n\n" to include "6 examples, 3 failures"
Diff:
@@ -1,2 +1,31 @@
-6 examples, 3 failures
+
+[1, 3, 5]
+ should all be odd
+ should all be a kind of Integer
+ should all be < 10
+ should all be even (FAILED - 1)
+
+Failures:
+
+ 1) [1, 3, 5] should all be even
+ Failure/Error: it { is_expected.to all( be_even ) }
+
+ expected [1, 3, 5] to all be even
+
+ object at index 0 failed to match:
+ expected `1.even?` to return true, got false
+
+ object at index 1 failed to match:
+ expected `3.even?` to return true, got false
+
+ object at index 2 failed to match:
+ expected `5.even?` to return true, got false
+ # ./array_all_matcher_spec.rb:7:in `block (2 levels) in <top (required)>'
+
+Finished in 0.01949 seconds (files took 0.1205 seconds to load)
+4 examples, 1 failure
+
+Failed examples:
+
+rspec ./array_all_matcher_spec.rb:7 # [1, 3, 5] should all be even
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/additional_cli_steps.rb:13:in `block (2 levels) in <top (required)>'
./features/step_definitions/additional_cli_steps.rb:9:in `/^the output should contain all of these:$/'
features/built_in_matchers/all.feature:36:in `Then the output should contain all of these:'
Failing Scenarios:
cucumber features/built_in_matchers/all.feature:21 # Scenario: array usage
1 scenario (1 failed)
3 steps (1 failed, 2 passed)
0m0.567s
@johnsyweb
Copy link
Author

Oh, LOL...

cat ~/.rspec 
--color
--fail-fast
--format d

Moving this file out of the way fixed the cukes on master!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment