Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add scenario

  • Loading branch information...
commit 5f754c6a969ea8b8053944ad478c37804268df48 1 parent 847e2b6
@dchelimsky dchelimsky authored
View
40 features/command_line/line_number_option.feature
@@ -0,0 +1,40 @@
+Feature: line number option
+
+ As an Rspec user
+ I want to run one example identified by the line number
+
+ Scenario: standard examples
+ Given a file named "example_spec.rb" with:
+ """
+ describe 9 do
+
+ it "should be > 8" do
+ 9.should be > 8
+ end
+
+ it "should be < 10" do
+ 9.should be < 10
+ end
+
+ end
+ """
+ When I run "spec example_spec.rb --line 3 --format doc"
+ Then the stdout should match "1 example, 0 failures"
+ Then the stdout should match "should be > 8"
+ But the stdout should not match "should be < 10"
+
+ Scenario: one liner
+ Given a file named "example_spec.rb" with:
+ """
+ describe 9 do
+
+ it { should be > 8 }
+
+ it { should be < 10 }
+
+ end
+ """
+ When I run "spec example_spec.rb --line 3 --format doc"
+ Then the stdout should match "1 example, 0 failures"
+ Then the stdout should match "should be > 8"
+ But the stdout should not match "should be < 10"
View
22 features/command_line/line_number_option_with_example_with_no_name.feature
@@ -1,22 +0,0 @@
-Feature: line number option with one liner example
-
- As an Rspec user
- I want to run one example identified by the line number
-
- Background:
- Given a file named "example_spec.rb" with:
- """
- describe 9 do
-
- it { should be > 8 }
-
- it { should be < 10 }
-
- end
- """
-
- Scenario: two examples - first example on declaration line
- When I run "spec example_spec.rb --line 3 --format doc"
- Then the stdout should match "1 example, 0 failures"
- Then the stdout should match "should be > 8"
- But the stdout should not match "should be < 10"
Please sign in to comment.
Something went wrong with that request. Please try again.