]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/stories/interop/examples_and_tests_together
6583f89c6ce174fba0461996f987e31b1b6f897a
[rails.git] / vendor / gems / rspec-1.1.2 / stories / interop / examples_and_tests_together
1 Story: Spec and test together
2
3   As an RSpec adopter with existing Test::Unit tests
4   I want to run a few specs alongside my existing Test::Unit tests
5   So that I can experience a smooth, gradual migration path
6
7   Scenario: Run with ruby
8     Given the file test/spec_and_test_together.rb
9
10     When I run it with the ruby interpreter -fs
11
12     Then the exit code should be 256
13     And the stdout should match "ATest"
14     And the stdout should match "Test::Unit::AssertionFailedError in 'An Example should fail with assert'"
15     And the stdout should match "'An Example should fail with should' FAILED"
16     And the stdout should match "10 examples, 6 failures"
17     And the stdout should match /expected: 40,\s*got: 4/m
18     And the stdout should match /expected: 50,\s*got: 5/m
19   Scenario: Run with spec
20     Given the file test/spec_and_test_together.rb
21
22     When I run it with the spec script -fs
23
24     Then the exit code should be 256
25     Ands the stdout should match "ATest"
26     And the stdout should match "Test::Unit::AssertionFailedError in 'An Example should fail with assert'"
27     And the stdout should match "'An Example should fail with should' FAILED"
28     And the stdout should match "10 examples, 6 failures"
29     And the stdout should match /expected: 40,\s*got: 4/m
30     And the stdout should match /expected: 50,\s*got: 5/m