aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/rspec-1.3.1/features/example_groups
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gems/rspec-1.3.1/features/example_groups')
-rw-r--r--vendor/gems/rspec-1.3.1/features/example_groups/define_example_attribute.feature41
-rw-r--r--vendor/gems/rspec-1.3.1/features/example_groups/example_group_with_should_methods.feature29
-rw-r--r--vendor/gems/rspec-1.3.1/features/example_groups/implicit_docstrings.feature59
-rw-r--r--vendor/gems/rspec-1.3.1/features/example_groups/nested_groups.feature32
4 files changed, 0 insertions, 161 deletions
diff --git a/vendor/gems/rspec-1.3.1/features/example_groups/define_example_attribute.feature b/vendor/gems/rspec-1.3.1/features/example_groups/define_example_attribute.feature
deleted file mode 100644
index 9fc72ac64..000000000
--- a/vendor/gems/rspec-1.3.1/features/example_groups/define_example_attribute.feature
+++ /dev/null
@@ -1,41 +0,0 @@
-Feature: Define example attribute
-
- In order to streamline process
- As an RSpec user
- I want to easily define helper methods that act as a variable assignment
-
- It is fairly common to start with a local variable in one example, use the same
- local variable in the next, and then extract the declaration of that variable
- to before(:each). This requires converting the locals to instance variables.
-
- This feature streamlines the process by defining a helper method so you can extract
- the duplication without having to change other references to the same variables
- to @instance_variables.
-
- Scenario:
- Given a file named "counter_spec.rb" with:
- """
- require 'spec/autorun'
-
- class Counter
- def initialize
- @count = 0
- end
- def count
- @count += 1
- end
- end
-
- describe Counter do
- let(:counter) { Counter.new }
- it "returns 1 the first time" do
- counter.count.should == 1
- end
- it "returns 2 the second time because the counter itself is cached by the 'assign' method" do
- counter.count
- counter.count.should == 2
- end
- end
- """
- When I run "spec counter_spec.rb"
- Then the stdout should include "2 examples, 0 failures"
diff --git a/vendor/gems/rspec-1.3.1/features/example_groups/example_group_with_should_methods.feature b/vendor/gems/rspec-1.3.1/features/example_groups/example_group_with_should_methods.feature
deleted file mode 100644
index b5f76bf8a..000000000
--- a/vendor/gems/rspec-1.3.1/features/example_groups/example_group_with_should_methods.feature
+++ /dev/null
@@ -1,29 +0,0 @@
-Feature: Spec::ExampleGroup with should methods
-
- As an RSpec adopter accustomed to classes and methods
- I want to use should_* methods in an ExampleGroup
- So that I use RSpec with classes and methods that look more like RSpec examples
-
- Scenario Outline: Example Group class with should methods
- Given a file named "example_group_with_should_methods.rb" with:
- """
- require 'spec/autorun'
-
- class MySpec < Spec::ExampleGroup
- def should_pass_with_should
- 1.should == 1
- end
-
- def should_fail_with_should
- 1.should == 2
- end
- end
- """
- When I run "<Command> example_group_with_should_methods.rb"
- Then the exit code should be 256
- And the stdout should include "2 examples, 1 failure"
-
- Scenarios: Run with ruby and spec
- | Command |
- | ruby |
- | spec |
diff --git a/vendor/gems/rspec-1.3.1/features/example_groups/implicit_docstrings.feature b/vendor/gems/rspec-1.3.1/features/example_groups/implicit_docstrings.feature
deleted file mode 100644
index b83a3470c..000000000
--- a/vendor/gems/rspec-1.3.1/features/example_groups/implicit_docstrings.feature
+++ /dev/null
@@ -1,59 +0,0 @@
-Feature: implicit docstrings
-
- As an RSpec user
- I want examples to generate their own names
- So that I can reduce duplication between example names and example code
-
- Scenario Outline: run passing examples
- Given a file named "implicit_docstrings_example.rb" with:
- """
- require 'spec/autorun'
- describe "Examples with no docstrings generate their own:" do
-
- specify { 3.should be < 5 }
-
- specify { ["a"].should include("a") }
-
- specify { [1,2,3].should respond_to(:size) }
-
- end
- """
-
- When I run "<Command> implicit_docstrings_example.rb -fs"
-
- Then the stdout should include /should be < 5/
- And the stdout should include /should include "a"/
- And the stdout should include /should respond to #size/
-
- Scenarios: Run with ruby and spec
- | Command |
- | ruby |
- | spec |
-
- Scenario Outline: run failing examples
- Given a file named "failing_implicit_docstrings_example.rb" with:
- """
- require 'spec/autorun'
- describe "Failing examples with no descriptions" do
-
- # description is auto-generated as "should equal(5)" based on the last #should
- it do
- 3.should equal(2)
- 5.should equal(5)
- end
-
- it { 3.should be > 5 }
-
- it { ["a"].should include("b") }
-
- it { [1,2,3].should_not respond_to(:size) }
-
- end
- """
-
- When I run "<Command> failing_implicit_docstrings_example.rb -fs"
-
- Then the stdout should include /should equal 2/
- And the stdout should include /should be > 5/
- And the stdout should include /should include "b"/
- And the stdout should include /should not respond to #size/
diff --git a/vendor/gems/rspec-1.3.1/features/example_groups/nested_groups.feature b/vendor/gems/rspec-1.3.1/features/example_groups/nested_groups.feature
deleted file mode 100644
index 6d8c7aadf..000000000
--- a/vendor/gems/rspec-1.3.1/features/example_groups/nested_groups.feature
+++ /dev/null
@@ -1,32 +0,0 @@
-Feature: Nested example groups
-
- As an RSpec user
- I want to nest examples groups
- So that I can better organize my examples
-
- Scenario Outline: Nested example groups
- Given a file named "nested_example_groups.rb" with:
- """
- require 'spec/autorun'
-
- describe "Some Object" do
- describe "with some more context" do
- it "should do this" do
- true.should be_true
- end
- end
- describe "with some other context" do
- it "should do that" do
- false.should be_false
- end
- end
- end
- """
- When I run "<Command> nested_example_groups.rb -fs"
- Then the stdout should include /Some Object with some more context/
- And the stdout should include /Some Object with some other context/
-
- Scenarios: Run with ruby and spec
- | Command |
- | ruby |
- | spec |