Skip to content

Commit

Permalink
update features to run in ruby-1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed May 30, 2010
1 parent ea981fb commit b9db085
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 55 deletions.
22 changes: 11 additions & 11 deletions features/command_line/line_number_appended_to_path.feature
Expand Up @@ -29,77 +29,77 @@ Feature: line number appended to file path
"""

Scenario: nested groups - outer group on declaration line
When I run "rspec example_spec.rb:1 --format doc"
When I run "rspec ./example_spec.rb:1 --format doc"
Then I should see "3 examples, 0 failures"
And I should see "second example in outer group"
And I should see "first example in outer group"
And I should see "example in nested group"

Scenario: nested groups - outer group inside block before example
When I run "rspec example_spec.rb:2 --format doc"
When I run "rspec ./example_spec.rb:2 --format doc"
Then I should see "3 examples, 0 failures"
And I should see "second example in outer group"
And I should see "first example in outer group"
And I should see "example in nested group"

Scenario: nested groups - inner group on declaration line
When I run "rspec example_spec.rb:11 --format doc"
When I run "rspec ./example_spec.rb:11 --format doc"
Then I should see "1 example, 0 failures"
And I should see "example in nested group"
And I should not see "second example in outer group"
And I should not see "first example in outer group"

Scenario: nested groups - inner group inside block before example
When I run "rspec example_spec.rb:12 --format doc"
When I run "rspec ./example_spec.rb:12 --format doc"
Then I should see "1 example, 0 failures"
And I should see "example in nested group"
And I should not see "second example in outer group"
And I should not see "first example in outer group"

Scenario: two examples - first example on declaration line
When I run "rspec example_spec.rb:3 --format doc"
When I run "rspec ./example_spec.rb:3 --format doc"
Then I should see "1 example, 0 failures"
And I should see "first example in outer group"
But I should not see "second example in outer group"
And I should not see "example in nested group"

Scenario: two examples - first example inside block
When I run "rspec example_spec.rb:4 --format doc"
When I run "rspec ./example_spec.rb:4 --format doc"
Then I should see "1 example, 0 failures"
And I should see "first example in outer group"
But I should not see "second example in outer group"
And I should not see "example in nested group"

Scenario: two examples - first example on end
When I run "rspec example_spec.rb:5 --format doc"
When I run "rspec ./example_spec.rb:5 --format doc"
Then I should see "1 example, 0 failures"
And I should see "first example in outer group"
But I should not see "second example in outer group"
And I should not see "example in nested group"

Scenario: two examples - first example after end but before next example
When I run "rspec example_spec.rb:6 --format doc"
When I run "rspec ./example_spec.rb:6 --format doc"
Then I should see "1 example, 0 failures"
And I should see "first example in outer group"
But I should not see "second example in outer group"
And I should not see "example in nested group"

Scenario: two examples - second example on declaration line
When I run "rspec example_spec.rb:7 --format doc"
When I run "rspec ./example_spec.rb:7 --format doc"
Then I should see "1 example, 0 failures"
And I should see "second example in outer group"
But I should not see "first example in outer group"
And I should not see "example in nested group"

Scenario: two examples - second example inside block
When I run "rspec example_spec.rb:7 --format doc"
When I run "rspec ./example_spec.rb:7 --format doc"
Then I should see "1 example, 0 failures"
And I should see "second example in outer group"
But I should not see "first example in outer group"
And I should not see "example in nested group"

Scenario: two examples - second example on end
When I run "rspec example_spec.rb:7 --format doc"
When I run "rspec ./example_spec.rb:7 --format doc"
Then I should see "1 example, 0 failures"
And I should see "second example in outer group"
But I should not see "first example in outer group"
Expand Down
4 changes: 2 additions & 2 deletions features/command_line/line_number_option.feature
Expand Up @@ -20,7 +20,7 @@ Feature: line number option
end
"""
When I run "rspec example_spec.rb --line 5 --format doc"
When I run "rspec ./example_spec.rb --line 5 --format doc"
Then I should see "1 example, 0 failures"
Then I should see "should be > 8"
But the stdout should not contain "should be < 10"
Expand All @@ -38,7 +38,7 @@ Feature: line number option
end
"""
When I run "rspec example_spec.rb --line 5 --format doc"
When I run "rspec ./example_spec.rb --line 5 --format doc"
Then I should see "1 example, 0 failures"
Then I should see "should be > 8"
But the stdout should not contain "should be < 10"
6 changes: 3 additions & 3 deletions features/configuration/custom_options.feature
Expand Up @@ -21,7 +21,7 @@ Feature: custom options
end
end
"""
When I run "rspec boolean_option_spec.rb"
When I run "rspec ./boolean_option_spec.rb"
Then I should see "2 examples, 0 failures"

Scenario: boolean option set to default to true
Expand All @@ -41,7 +41,7 @@ Feature: custom options
end
end
"""
When I run "rspec boolean_option_spec.rb"
When I run "rspec ./boolean_option_spec.rb"
Then I should see "2 examples, 0 failures"

@wip
Expand All @@ -66,6 +66,6 @@ Feature: custom options
end
end
"""
When I run "rspec boolean_option_spec.rb"
When I run "rspec ./boolean_option_spec.rb"
Then I should see "2 examples, 0 failures"

6 changes: 3 additions & 3 deletions features/configuration/options_file.feature
Expand Up @@ -20,7 +20,7 @@ Feature: spec/spec.opts
end
end
"""
When I run "rspec spec/example_spec.rb"
When I run "rspec ./spec/example_spec.rb"
Then I should see "1 example, 0 failures"

Scenario: color set in .rspec
Expand All @@ -38,7 +38,7 @@ Feature: spec/spec.opts
end
end
"""
When I run "rspec spec/example_spec.rb"
When I run "rspec ./spec/example_spec.rb"
Then I should see "1 example, 0 failures"

@wip
Expand All @@ -63,6 +63,6 @@ Feature: spec/spec.opts
end
end
"""
When I run "rspec spec/example_spec.rb"
When I run "rspec ./spec/example_spec.rb"
Then I should see "1 example, 0 failures"

2 changes: 1 addition & 1 deletion features/example_groups/describe_aliases.feature
Expand Up @@ -17,7 +17,7 @@ Feature: Nested example groups
end
end
"""
When I run "rspec context_instead_of_describe_spec.rb -fn"
When I run "rspec ./context_instead_of_describe_spec.rb -fn"
Then I should see:
"""
Using context
Expand Down
2 changes: 1 addition & 1 deletion features/example_groups/nested_groups.feature
Expand Up @@ -20,7 +20,7 @@ Feature: Nested example groups
end
end
"""
When I run "rspec nested_example_groups.rb -fdoc"
When I run "rspec ./nested_example_groups.rb -fdoc"
Then I should see matching /^Some Object/
And I should see matching /^\s+with some more context/
And I should see matching /^\s+with some other context/
6 changes: 3 additions & 3 deletions features/filtering/inclusion_filters.feature
Expand Up @@ -15,7 +15,7 @@ Feature: inclusion feature
end
end
"""
When I run "rspec spec/sample_spec.rb --format doc"
When I run "rspec ./spec/sample_spec.rb --format doc"
Then I should see "does another thing"
And I should not see "does one thing"

Expand All @@ -39,7 +39,7 @@ Feature: inclusion feature
end
end
"""
When I run "rspec spec/sample_spec.rb --format doc"
When I run "rspec ./spec/sample_spec.rb --format doc"
Then I should see "group 1 example 1"
And I should see "group 1 example 2"
And I should not see "group 2 example 1"
Expand All @@ -65,7 +65,7 @@ Feature: inclusion feature
end
end
"""
When I run "rspec spec/sample_spec.rb --format doc"
When I run "rspec ./spec/sample_spec.rb --format doc"
Then I should see "No examples were matched by {:focus=>true}, running all"
And I should see "group 1 example 1"
And I should see "group 1 example 2"
Expand Down
2 changes: 1 addition & 1 deletion features/formatters/custom_formatter.feature
Expand Up @@ -27,6 +27,6 @@ Feature: custom formatters
end
"""

When I run "rspec simple_example_spec.rb --require custom_formatter.rb --format CustomFormatter"
When I run "rspec ./simple_example_spec.rb --require custom_formatter.rb --format CustomFormatter"
Then I should see "example: my example"
And the exit status should be 0
2 changes: 1 addition & 1 deletion features/hooks/around_hook.feature
Expand Up @@ -31,6 +31,6 @@ Feature: around hook
end
end
"""
When I run "rspec around_each_in_example_group_spec.rb"
When I run "rspec ./around_each_in_example_group_spec.rb"
Then the stderr should not contain "NoMethodError"
Then I should see "2 examples, 0 failures"
20 changes: 10 additions & 10 deletions features/hooks/before_and_after_hooks.feature
Expand Up @@ -55,7 +55,7 @@ Feature: before and after hooks
end
end
"""
When I run "rspec before_each_spec.rb"
When I run "rspec ./before_each_spec.rb"
Then I should see "3 examples, 0 failures"

Scenario: define before(:all) block in example group
Expand Down Expand Up @@ -89,10 +89,10 @@ Feature: before and after hooks
end
end
"""
When I run "rspec before_all_spec.rb"
When I run "rspec ./before_all_spec.rb"
Then I should see "3 examples, 0 failures"

When I run "rspec before_all_spec.rb:15"
When I run "rspec ./before_all_spec.rb:15"
Then I should see "1 example, 0 failures"

Scenario: define before and after blocks in configuration
Expand Down Expand Up @@ -122,7 +122,7 @@ Feature: before and after hooks
end
end
"""
When I run "rspec befores_in_configuration_spec.rb"
When I run "rspec ./befores_in_configuration_spec.rb"
Then I should see "2 examples, 0 failures"

Scenario: before/after blocks are run in order
Expand Down Expand Up @@ -152,7 +152,7 @@ Feature: before and after hooks
end
end
"""
When I run "rspec ensure_block_order_spec.rb"
When I run "rspec ./ensure_block_order_spec.rb"
Then I should see matching /before all\nbefore each\nafter each\n.after all/

Scenario: before/after all blocks are run once
Expand Down Expand Up @@ -185,15 +185,15 @@ Feature: before and after hooks
end
"""
When I run "rspec before_and_after_all_spec.rb"
When I run "rspec ./before_and_after_all_spec.rb"
Then I should see "2 examples, 0 failures"
Then I should see matching /outer before all\n.inner before all\n.inner after all\nouter after all\n\n\n\nFinished/

When I run "rspec before_and_after_all_spec.rb:14"
When I run "rspec ./before_and_after_all_spec.rb:14"
Then I should see "1 example, 0 failures"
Then I should see matching /outer before all\ninner before all\n.inner after all\nouter after all\n\n\n\nFinished/

When I run "rspec before_and_after_all_spec.rb:6"
When I run "rspec ./before_and_after_all_spec.rb:6"
Then I should see "1 example, 0 failures"
Then I should see matching /outer before all\n.outer after all\n\n\n\nFinished/

Expand All @@ -209,7 +209,7 @@ Feature: before and after hooks
end
end
"""
When I run "rspec error_in_before_each_spec.rb"
When I run "rspec ./error_in_before_each_spec.rb"
Then I should see "1 example, 1 failure"
And I should see "this error"

Expand All @@ -226,6 +226,6 @@ Feature: before and after hooks
end
end
"""
When I run "rspec error_in_before_all_spec.rb"
When I run "rspec ./error_in_before_all_spec.rb"
Then I should see "1 example, 1 failure"
And I should see "this error"
2 changes: 1 addition & 1 deletion features/hooks/described_class.feature
Expand Up @@ -9,6 +9,6 @@ Feature: described class
end
end
"""
When I run "rspec spec/example_spec.rb"
When I run "rspec ./spec/example_spec.rb"
Then I should see "1 example, 0 failures"

2 changes: 1 addition & 1 deletion features/hooks/halt.feature
Expand Up @@ -23,5 +23,5 @@ Feature: halt
end
end
"""
When I run "rspec spec/example_spec.rb"
When I run "rspec ./spec/example_spec.rb"
Then I should see "1 example, 1 failure"
2 changes: 1 addition & 1 deletion features/mock_framework_integration/use_flexmock.feature
Expand Up @@ -18,6 +18,6 @@ Feature: mock with flexmock
end
end
"""
When I run "rspec flexmock_example_spec.rb"
When I run "rspec ./flexmock_example_spec.rb"
Then I should see "1 example, 0 failures"
And the exit status should be 0
2 changes: 1 addition & 1 deletion features/mock_framework_integration/use_mocha.feature
Expand Up @@ -18,6 +18,6 @@ Feature: mock with mocha
end
end
"""
When I run "rspec mocha_example_spec.rb"
When I run "rspec ./mocha_example_spec.rb"
Then I should see "1 example, 0 failures"
And the exit status should be 0
2 changes: 1 addition & 1 deletion features/mock_framework_integration/use_rr.feature
Expand Up @@ -18,6 +18,6 @@ Feature: mock with rr
end
end
"""
When I run "rspec rr_example_spec.rb"
When I run "rspec ./rr_example_spec.rb"
Then I should see "1 example, 0 failures"
And the exit status should be 0
2 changes: 1 addition & 1 deletion features/mock_framework_integration/use_rspec.feature
Expand Up @@ -18,6 +18,6 @@ Feature: mock with rspec
end
end
"""
When I run "rspec rspec_example_spec.rb"
When I run "rspec ./rspec_example_spec.rb"
Then I should see "1 example, 0 failures"
And the exit status should be 0
8 changes: 4 additions & 4 deletions features/pending/pending_examples.feature
Expand Up @@ -10,7 +10,7 @@ Feature: pending examples
it "is a pending example"
end
"""
When I run "rspec example_without_block_spec.rb"
When I run "rspec ./example_without_block_spec.rb"
Then the exit status should be 0
And I should see "1 example, 0 failures, 1 pending"
And I should see "Not Yet Implemented"
Expand All @@ -26,7 +26,7 @@ Feature: pending examples
end
end
"""
When I run "rspec pending_without_block_spec.rb"
When I run "rspec ./pending_without_block_spec.rb"
Then the exit status should be 0
And I should see "1 example, 0 failures, 1 pending"
And I should see "(something else getting finished)"
Expand All @@ -43,7 +43,7 @@ Feature: pending examples
end
end
"""
When I run "rspec pending_with_failing_block_spec.rb"
When I run "rspec ./pending_with_failing_block_spec.rb"
Then the exit status should be 0
And I should see "1 example, 0 failures, 1 pending"
And I should see "(something else getting finished)"
Expand All @@ -60,7 +60,7 @@ Feature: pending examples
end
end
"""
When I run "rspec pending_with_passing_block_spec.rb"
When I run "rspec ./pending_with_passing_block_spec.rb"
Then the exit status should not be 0
And I should see "1 example, 1 failure"
And I should see "FIXED"
Expand Down

0 comments on commit b9db085

Please sign in to comment.