Permalink
Browse files

stdout should include (in cukes)

  • Loading branch information...
1 parent 7943808 commit 0b2caa75973e462d785e7f8ad2da8f14ead7fcc3 @dchelimsky committed Aug 23, 2009
Showing with 108 additions and 108 deletions.
  1. +4 −4 features/before_and_after_blocks/before_and_after_blocks.feature
  2. +14 −14 features/command_line/line_number_option.feature
  3. +2 −2 features/command_line/line_number_option_with_example_with_no_name.feature
  4. +1 −1 features/example_groups/define_example_attribute_readers.feature
  5. +1 −1 features/example_groups/example_group_with_should_methods.feature
  6. +7 −7 features/example_groups/implicit_docstrings.feature
  7. +2 −2 features/example_groups/nested_groups.feature
  8. +4 −4 features/expectations/customized_message.feature
  9. +4 −4 features/expectations/expect_change.feature
  10. +4 −4 features/expectations/expect_error.feature
  11. +1 −1 features/extensions/custom_example_group.feature
  12. +1 −1 features/formatters/custom_formatter.feature
  13. +6 −6 features/interop/examples_and_tests_together.feature
  14. +1 −1 features/interop/rspec_output.feature
  15. +1 −1 features/interop/test_case_with_should_methods.feature
  16. +2 −2 features/matchers/define_diffable_matcher.feature
  17. +19 −19 features/matchers/define_matcher.feature
  18. +2 −2 features/matchers/define_matcher_outside_rspec.feature
  19. +2 −2 features/matchers/define_matcher_with_fluent_interface.feature
  20. +1 −1 features/mock_framework_integration/use_flexmock.feature
  21. +1 −1 features/mock_framework_integration/use_mocha.feature
  22. +1 −1 features/mock_framework_integration/use_rr.feature
  23. +1 −1 features/mocks/mix_stubs_and_mocks.feature
  24. +1 −1 features/mocks/stub_implementation.feature
  25. +16 −16 features/pending/pending_examples.feature
  26. +4 −4 features/runner/specify_line_number.feature
  27. +1 −1 features/step_definitions/running_rspec_steps.rb
  28. +2 −2 features/subject/explicit_subject.feature
  29. +2 −2 features/subject/implicit_subject.feature
@@ -58,7 +58,7 @@ Feature: before and after blocks
end
"""
When I run "spec before_each_in_example_group_spec.rb"
- Then the stdout should match "3 examples, 0 failures"
+ Then the stdout should include "3 examples, 0 failures"
Scenario: define before(:all) block in example group
Given a file named "before_all_in_example_group_spec.rb" with:
@@ -90,7 +90,7 @@ Feature: before and after blocks
end
"""
When I run "spec before_all_in_example_group_spec.rb"
- Then the stdout should match "3 examples, 0 failures"
+ Then the stdout should include "3 examples, 0 failures"
Scenario: define before and after blocks in configuration
Given a file named "befores_in_configuration_spec.rb" with:
@@ -126,7 +126,7 @@ Feature: before and after blocks
end
"""
When I run "spec befores_in_configuration_spec.rb"
- Then the stdout should match "3 examples, 0 failures"
+ Then the stdout should include "3 examples, 0 failures"
Scenario: before/after blocks are run in order
Given a file named "ensure_block_order_spec.rb" with:
@@ -163,5 +163,5 @@ Feature: before and after blocks
end
"""
When I run "spec ensure_block_order_spec.rb"
- Then the stdout should match /before suite\nbefore all\nbefore each\nafter each\n\.after all\n.*after suite/m
+ Then the stdout should include /before suite\nbefore all\nbefore each\nafter each\n\.after all\n.*after suite/m
@@ -21,36 +21,36 @@ Feature: Spec and test together
Scenario: two examples - first example on declaration line
When I run "spec example.rb:3 --format nested"
- Then the stdout should match "1 example, 0 failures"
- And the stdout should match "has a first example"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a first example"
But the stdout should not match "has a second example"
Scenario: two examples - first example from line inside declaration
When I run "spec example.rb:4 --format nested"
- Then the stdout should match "1 example, 0 failures"
- And the stdout should match "has a first example"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a first example"
But the stdout should not match "has a second example"
Scenario: two examples - first example from line below declaration
When I run "spec example.rb:6 --format nested"
- Then the stdout should match "1 example, 0 failures"
- And the stdout should match "has a first example"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a first example"
But the stdout should not match "has a second example"
Scenario: two examples - second example from line below declaration
When I run "spec example.rb:7 --format nested"
- Then the stdout should match "1 example, 0 failures"
- And the stdout should match "has a second example"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a second example"
But the stdout should not match "has a first example"
Scenario: two examples - both examples from the group declaration
When I run "spec example.rb:1 --format nested"
- Then the stdout should match "2 examples, 0 failures"
- And the stdout should match "has a second example"
- And the stdout should match "has a first example"
+ Then the stdout should include "2 examples, 0 failures"
+ And the stdout should include "has a second example"
+ And the stdout should include "has a first example"
Scenario: two examples - both examples from above the first example declaration
When I run "spec example.rb:2 --format nested"
- Then the stdout should match "2 examples, 0 failures"
- And the stdout should match "has a second example"
- And the stdout should match "has a first example"
+ Then the stdout should include "2 examples, 0 failures"
+ And the stdout should include "has a second example"
+ And the stdout should include "has a first example"
@@ -17,6 +17,6 @@ Feature: Spec and test together
Scenario: two examples - first example on declaration line
When I run "spec example.rb:3 --format nested"
- Then the stdout should match "1 example, 0 failures"
- Then the stdout should match "should be > 8"
+ Then the stdout should include "1 example, 0 failures"
+ Then the stdout should include "should be > 8"
But the stdout should not match "should be < 10"
@@ -38,4 +38,4 @@ Feature: Define example attribute readers
end
"""
When I run "spec counter_spec.rb"
- Then the stdout should match "2 examples, 0 failures"
+ Then the stdout should include "2 examples, 0 failures"
@@ -21,7 +21,7 @@ Feature: Spec::ExampleGroup with should methods
"""
When I run "<Command> example_group_with_should_methods.rb"
Then the exit code should be 256
- And the stdout should match "2 examples, 1 failure"
+ And the stdout should include "2 examples, 1 failure"
Scenarios: Run with ruby and spec
| Command |
@@ -21,9 +21,9 @@ Feature: implicit docstrings
When I run "<Command> implicit_docstrings_example.rb -fs"
- Then the stdout should match /should be < 5/
- And the stdout should match /should include "a"/
- And the stdout should match /should respond to #size/
+ Then the stdout should include /should be < 5/
+ And the stdout should include /should include "a"/
+ And the stdout should include /should respond to #size/
Scenarios: Run with ruby and spec
| Command |
@@ -53,7 +53,7 @@ Feature: implicit docstrings
When I run "<Command> failing_implicit_docstrings_example.rb -fs"
- Then the stdout should match /should equal 2/
- And the stdout should match /should be > 5/
- And the stdout should match /should include "b"/
- And the stdout should match /should not respond to #size/
+ Then the stdout should include /should equal 2/
+ And the stdout should include /should be > 5/
+ And the stdout should include /should include "b"/
+ And the stdout should include /should not respond to #size/
@@ -23,8 +23,8 @@ Feature: Nested example groups
end
"""
When I run "<Command> nested_example_groups.rb -fs"
- Then the stdout should match /Some Object with some more context/
- And the stdout should match /Some Object with some other context/
+ Then the stdout should include /Some Object with some more context/
+ And the stdout should include /Some Object with some other context/
Scenarios: Run with ruby and spec
| Command |
@@ -46,9 +46,9 @@ Feature: customized message
"""
When I run "spec node_spec.rb.rb --format specdoc"
- Then the stdout should match "3 examples, 3 failures"
+ Then the stdout should include "3 examples, 3 failures"
And the stdout should not match "to return true, got false"
And the stdout should not match "to return false, got true"
- And the stdout should match "node.state: started (first example)"
- And the stdout should match "node.state: started (second example)"
- And the stdout should match "expected a change"
+ And the stdout should include "node.state: started (first example)"
+ And the stdout should include "node.state: started (second example)"
+ And the stdout should include "expected a change"
@@ -30,8 +30,8 @@ Feature: expect change
end
"""
When I run "spec expect_change.rb"
- Then the stdout should match "2 examples, 1 failure"
- Then the stdout should match "should have been changed by 2, but was changed by 1"
+ Then the stdout should include "2 examples, 1 failure"
+ Then the stdout should include "should have been changed by 2, but was changed by 1"
Scenario: expecting no change
Given a file named "expect_no_change.rb" with:
@@ -61,5 +61,5 @@ Feature: expect change
end
"""
When I run "spec expect_no_change.rb"
- Then the stdout should match "2 examples, 1 failure"
- Then the stdout should match "should not have changed, but did change from 1 to 2"
+ Then the stdout should include "2 examples, 1 failure"
+ Then the stdout should include "should not have changed, but did change from 1 to 2"
@@ -19,8 +19,8 @@ Feature: expect error
end
"""
When I run "spec expect_error.rb"
- Then the stdout should match "2 examples, 1 failure"
- Then the stdout should match "expected NameError but nothing was raised"
+ Then the stdout should include "2 examples, 1 failure"
+ Then the stdout should include "expected NameError but nothing was raised"
Scenario: expect no error
Given a file named "expect_no_error.rb" with:
@@ -39,6 +39,6 @@ Feature: expect error
end
"""
When I run "spec expect_no_error.rb"
- Then the stdout should match "2 examples, 1 failure"
- Then the stdout should match "undefined method `non_existent_message'"
+ Then the stdout should include "2 examples, 1 failure"
+ Then the stdout should include "undefined method `non_existent_message'"
@@ -15,5 +15,5 @@ Feature: custom example group
end
"""
When I run "spec custom_example_group_spec.rb"
- Then the stdout should match "1 example, 0 failures"
+ Then the stdout should include "1 example, 0 failures"
@@ -27,4 +27,4 @@ Feature: custom formatters
When I run "spec simple_example_spec.rb --require custom_formatter.rb --format CustomFormatter"
Then the exit code should be 0
- And the stdout should match "example: my example"
+ And the stdout should include "example: my example"
@@ -67,12 +67,12 @@ Feature: Spec and test together
When I run "<Command> spec_and_test_together.rb -fs"
Then the exit code should be 256
- And the stdout should match "ATest"
- And the stdout should match "Test::Unit::AssertionFailedError in 'An Example should fail with assert'"
- And the stdout should match "'An Example should fail with should' FAILED"
- And the stdout should match "10 examples, 6 failures"
- And the stdout should match /expected: 40,\s*got: 4/m
- And the stdout should match /expected: 50,\s*got: 5/m
+ And the stdout should include "ATest"
+ And the stdout should include "Test::Unit::AssertionFailedError in 'An Example should fail with assert'"
+ And the stdout should include "'An Example should fail with should' FAILED"
+ And the stdout should include "10 examples, 6 failures"
+ And the stdout should include /expected: 40,\s*got: 4/m
+ And the stdout should include /expected: 50,\s*got: 5/m
Scenarios: run with ruby and spec
| Command |
@@ -17,7 +17,7 @@ Feature: spec output
When I run "<Command> simple_spec.rb"
Then the exit code should be 0
And the stdout should not match /\d+ tests, \d+ assertions, \d+ failures, \d+ errors/m
- And the stdout should match "1 example, 0 failures"
+ And the stdout should include "1 example, 0 failures"
Scenarios: Run with ruby and CommandLine object
| Command |
@@ -38,7 +38,7 @@ Story: Test::Unit::TestCase extended by rspec with should methods
"""
When I run "<Command> test_case_with_should_methods.rb"
Then the exit code should be 256
- And the stdout should match "5 examples, 3 failures"
+ And the stdout should include "5 examples, 3 failures"
Scenarios: Run with ruby and spec
| Command |
@@ -22,5 +22,5 @@ Feature: define diffable matcher
When I run "spec diffable_matcher_spec.rb --diff"
Then the exit code should be 256
- And the stdout should match "should be just like \"that\""
- And the stdout should match "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"
+ And the stdout should include "should be just like \"that\""
+ And the stdout should include "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"
@@ -35,14 +35,14 @@ Feature: define matcher
When I run "spec matcher_with_default_message_spec.rb --format specdoc"
Then the exit code should be 256
- And the stdout should match "should be a multiple of 3"
- And the stdout should match "should not be a multiple of 4"
- And the stdout should match "should be a multiple of 4 (FAILED - 1)"
- And the stdout should match "should not be a multiple of 3 (FAILED - 2)"
+ And the stdout should include "should be a multiple of 3"
+ And the stdout should include "should not be a multiple of 4"
+ And the stdout should include "should be a multiple of 4 (FAILED - 1)"
+ And the stdout should include "should not be a multiple of 3 (FAILED - 2)"
- And the stdout should match "4 examples, 2 failures"
- And the stdout should match "expected 9 to be a multiple of 4"
- And the stdout should match "expected 9 not to be a multiple of 3"
+ And the stdout should include "4 examples, 2 failures"
+ And the stdout should include "expected 9 to be a multiple of 4"
+ And the stdout should include "expected 9 not to be a multiple of 3"
Scenario: overriding the failure_message_for_should
Given a file named "matcher_with_failure_message_spec.rb" with:
@@ -63,8 +63,8 @@ Feature: define matcher
"""
When I run "spec matcher_with_failure_message_spec.rb"
Then the exit code should be 256
- And the stdout should match "1 example, 1 failure"
- And the stdout should match "expected that 9 would be a multiple of 4"
+ And the stdout should include "1 example, 1 failure"
+ And the stdout should include "expected that 9 would be a multiple of 4"
Scenario: overriding the failure_message_for_should_not
Given a file named "matcher_with_failure_for_message_spec.rb" with:
@@ -85,8 +85,8 @@ Feature: define matcher
"""
When I run "spec matcher_with_failure_for_message_spec.rb"
Then the exit code should be 256
- And the stdout should match "1 example, 1 failure"
- And the stdout should match "expected that 9 would not be a multiple of 3"
+ And the stdout should include "1 example, 1 failure"
+ And the stdout should include "expected that 9 would not be a multiple of 3"
Scenario: overriding the description
Given a file named "matcher_overriding_description_spec.rb" with:
@@ -110,9 +110,9 @@ Feature: define matcher
"""
When I run "spec matcher_overriding_description_spec.rb --format specdoc"
Then the exit code should be 0
- And the stdout should match "2 examples, 0 failures"
- And the stdout should match "should be multiple of 3"
- And the stdout should match "should not be multiple of 4"
+ And the stdout should include "2 examples, 0 failures"
+ And the stdout should include "should be multiple of 3"
+ And the stdout should include "should not be multiple of 4"
Scenario: with no args
Given a file named "matcher_with_no_args_spec.rb" with:
@@ -133,8 +133,8 @@ Feature: define matcher
"""
When I run "spec matcher_with_no_args_spec.rb --format specdoc"
Then the exit code should be 0
- And the stdout should match "1 example, 0 failures"
- And the stdout should match "should have 7 fingers"
+ And the stdout should include "1 example, 0 failures"
+ And the stdout should include "should have 7 fingers"
Scenario: with multiple args
Given a file named "matcher_with_multiple_args_spec.rb" with:
@@ -151,8 +151,8 @@ Feature: define matcher
"""
When I run "spec matcher_with_multiple_args_spec.rb --format specdoc"
Then the exit code should be 0
- And the stdout should match "1 example, 0 failures"
- And the stdout should match "should be the sum of 1, 2, 3, and 4"
+ And the stdout should include "1 example, 0 failures"
+ And the stdout should include "should be the sum of 1, 2, 3, and 4"
Scenario: with helper methods
Given a file named "matcher_with_internal_helper_spec.rb" with:
@@ -175,5 +175,5 @@ Feature: define matcher
"""
When I run "spec matcher_with_internal_helper_spec.rb"
Then the exit code should be 0
- And the stdout should match "1 example, 0 failures"
+ And the stdout should include "1 example, 0 failures"
@@ -34,5 +34,5 @@ Feature: define matcher outside rspec
"""
When I run "ruby test_multiples.rb"
Then the exit code should be 256
- And the stdout should match "expected 9 to be a multiple of 4"
- And the stdout should match "2 tests, 0 assertions, 1 failures, 0 errors"
+ And the stdout should include "expected 9 to be a multiple of 4"
+ And the stdout should include "2 tests, 0 assertions, 1 failures, 0 errors"
@@ -23,5 +23,5 @@ Feature: define matcher
end
"""
When I run "spec between_spec.rb --format specdoc"
- Then the stdout should match "1 example, 0 failures"
- And the stdout should match "should be bigger than 4"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "should be bigger than 4"
@@ -24,4 +24,4 @@ Feature: mock with flexmock
"""
When I run "spec flexmock_example_spec.rb"
Then the exit code should be 0
- And the stdout should match "2 examples, 0 failures"
+ And the stdout should include "2 examples, 0 failures"
@@ -24,4 +24,4 @@ Feature: mock with mocha
"""
When I run "spec mocha_example_spec.rb"
Then the exit code should be 0
- And the stdout should match "2 examples, 0 failures"
+ And the stdout should include "2 examples, 0 failures"
@@ -24,4 +24,4 @@ Feature: mock with rr
"""
When I run "spec rr_example_spec.rb"
Then the exit code should be 0
- And the stdout should match "2 examples, 0 failures"
+ And the stdout should include "2 examples, 0 failures"
@@ -19,4 +19,4 @@ Feature: Spec and test together
end
"""
When I run "spec stub_and_mocks_spec.rb --format nested"
- Then the stdout should match "received :foo with unexpected arguments\n expected: (\"first\")\n got: ([\"second\"], [\"third\"])"
+ Then the stdout should include "received :foo with unexpected arguments\n expected: (\"first\")\n got: ([\"second\"], [\"third\"])"
@@ -23,4 +23,4 @@ Feature: stub implementation
end
"""
When I run "spec stub_implementation.rb"
- Then the stdout should match "1 example, 0 failures"
+ Then the stdout should include "1 example, 0 failures"
Oops, something went wrong.

0 comments on commit 0b2caa7

Please sign in to comment.