Sha256: 0a1ed510d7a47658a90b1ec227672aef0df31e31b5306ddb609c1bb45b1769d9

Contents?: true

Size: 1.43 KB

Versions: 201

Compression:

Stored size: 1.43 KB

Contents

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: run passing examples
    Given a file named "implicit_docstrings_spec.rb" with:
    """
    describe "Examples with no docstrings generate their own:" do

      specify { 3.should be < 5 }

      specify { [1,2,3].should include(2) }

      specify { [1,2,3].should respond_to(:size) }

    end
    """

    When I run `rspec ./implicit_docstrings_spec.rb -fdoc`

    Then the output should contain "should be < 5"
    And the output should contain "should include 2"
    And the output should contain "should respond to #size"

  Scenario: run failing examples
    Given a file named "failing_implicit_docstrings_spec.rb" with:
    """
    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 { [1,2,3].should include(4) }

      it { [1,2,3].should_not respond_to(:size) }

    end
    """

    When I run `rspec ./failing_implicit_docstrings_spec.rb -fdoc`

    Then the output should contain "should equal 2"
    And the output should contain "should be > 5"
    And the output should contain "should include 4"
    And the output should contain "should not respond to #size"

Version data entries

201 entries across 100 versions & 14 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/rspec-expectations-2.9.0/features/implicit_docstrings.feature
classiccms-0.7.5 vendor/bundle/gems/rspec-expectations-2.10.0/features/implicit_docstrings.feature
classiccms-0.7.5 vendor/bundle/gems/rspec-expectations-2.9.1/features/implicit_docstrings.feature
classiccms-0.7.4 vendor/bundle/gems/rspec-expectations-2.9.0/features/implicit_docstrings.feature
classiccms-0.7.4 vendor/bundle/gems/rspec-expectations-2.9.1/features/implicit_docstrings.feature
classiccms-0.7.4 vendor/bundle/gems/rspec-expectations-2.10.0/features/implicit_docstrings.feature
classiccms-0.7.3 vendor/bundle/gems/rspec-expectations-2.10.0/features/implicit_docstrings.feature
classiccms-0.7.3 vendor/bundle/gems/rspec-expectations-2.9.0/features/implicit_docstrings.feature
classiccms-0.7.3 vendor/bundle/gems/rspec-expectations-2.9.1/features/implicit_docstrings.feature
tnargav-1.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-expectations-2.11.3/features/implicit_docstrings.feature
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/rspec-expectations-2.11.3/features/implicit_docstrings.feature
classiccms-0.7.2 vendor/bundle/gems/rspec-expectations-2.10.0/features/implicit_docstrings.feature
classiccms-0.7.2 vendor/bundle/gems/rspec-expectations-2.9.0/features/implicit_docstrings.feature
classiccms-0.7.2 vendor/bundle/gems/rspec-expectations-2.9.1/features/implicit_docstrings.feature
classiccms-0.7.1 vendor/bundle/gems/rspec-expectations-2.10.0/features/implicit_docstrings.feature
classiccms-0.7.1 vendor/bundle/gems/rspec-expectations-2.9.0/features/implicit_docstrings.feature
classiccms-0.7.1 vendor/bundle/gems/rspec-expectations-2.9.1/features/implicit_docstrings.feature
classiccms-0.7.0 vendor/bundle/gems/rspec-expectations-2.10.0/features/implicit_docstrings.feature
classiccms-0.7.0 vendor/bundle/gems/rspec-expectations-2.9.1/features/implicit_docstrings.feature
classiccms-0.7.0 vendor/bundle/gems/rspec-expectations-2.9.0/features/implicit_docstrings.feature