1
Story: Spec and test together
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
7
Scenario: Run with ruby
8
Given the file test/spec_and_test_together.rb
10
When I run it with the ruby interpreter -fs
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
22
When I run it with the spec script -fs
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