aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/rspec-1.3.1/features/command_line
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gems/rspec-1.3.1/features/command_line')
-rw-r--r--vendor/gems/rspec-1.3.1/features/command_line/line_number_option.feature56
-rw-r--r--vendor/gems/rspec-1.3.1/features/command_line/line_number_option_with_example_with_no_name.feature22
2 files changed, 78 insertions, 0 deletions
diff --git a/vendor/gems/rspec-1.3.1/features/command_line/line_number_option.feature b/vendor/gems/rspec-1.3.1/features/command_line/line_number_option.feature
new file mode 100644
index 000000000..7fc6fc50d
--- /dev/null
+++ b/vendor/gems/rspec-1.3.1/features/command_line/line_number_option.feature
@@ -0,0 +1,56 @@
+Feature: Spec and test together
+
+ As an RSpec user
+ I want to run one example identified by the line number
+
+ Background:
+ Given a file named "example.rb" with:
+ """
+ describe "a group" do
+
+ it "has a first example" do
+
+ end
+
+ it "has a second example" do
+
+ end
+
+ end
+ """
+
+ Scenario: two examples - first example on declaration line
+ When I run "spec example.rb:3 --format nested"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a first example"
+ But the stdout should not match "has a second example"
+
+ Scenario: two examples - first example from line inside declaration
+ When I run "spec example.rb:4 --format nested"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a first example"
+ But the stdout should not match "has a second example"
+
+ Scenario: two examples - first example from line below declaration
+ When I run "spec example.rb:6 --format nested"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a first example"
+ But the stdout should not match "has a second example"
+
+ Scenario: two examples - second example from line below declaration
+ When I run "spec example.rb:7 --format nested"
+ Then the stdout should include "1 example, 0 failures"
+ And the stdout should include "has a second example"
+ But the stdout should not match "has a first example"
+
+ Scenario: two examples - both examples from the group declaration
+ When I run "spec example.rb:1 --format nested"
+ Then the stdout should include "2 examples, 0 failures"
+ And the stdout should include "has a second example"
+ And the stdout should include "has a first example"
+
+ Scenario: two examples - both examples from above the first example declaration
+ When I run "spec example.rb:2 --format nested"
+ Then the stdout should include "2 examples, 0 failures"
+ And the stdout should include "has a second example"
+ And the stdout should include "has a first example"
diff --git a/vendor/gems/rspec-1.3.1/features/command_line/line_number_option_with_example_with_no_name.feature b/vendor/gems/rspec-1.3.1/features/command_line/line_number_option_with_example_with_no_name.feature
new file mode 100644
index 000000000..244db51fb
--- /dev/null
+++ b/vendor/gems/rspec-1.3.1/features/command_line/line_number_option_with_example_with_no_name.feature
@@ -0,0 +1,22 @@
+Feature: Spec and test together
+
+ As an RSpec user
+ I want to run one example identified by the line number
+
+ Background:
+ Given a file named "example.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.rb:3 --format nested"
+ Then the stdout should include "1 example, 0 failures"
+ Then the stdout should include "should be > 8"
+ But the stdout should not match "should be < 10"