~ubuntu-branches/ubuntu/oneiric/puppet/oneiric-security

« back to all changes in this revision

Viewing changes to vendor/gems/rspec/stories/interop/examples_and_tests_together

  • Committer: Bazaar Package Importer
  • Author(s): Micah Anderson
  • Date: 2008-07-26 15:43:45 UTC
  • mto: (3.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20080726154345-1fmgo76b4l72ulvc
ImportĀ upstreamĀ versionĀ 0.24.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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