Sha256: 23027ad67da7a55e9000f958a767d281c408c114ab6496957c330e642fdff250

Contents?: true

Size: 1.43 KB

Versions: 28

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

28 entries across 28 versions & 4 rubygems

Version Path
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/features/implicit_docstrings.feature
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/features/implicit_docstrings.feature
rspec-expectations-2.5.0 features/implicit_docstrings.feature
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
rspec-expectations-2.4.0 features/implicit_docstrings.feature
vim-jar-0.1.2 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
vim-jar-0.1.1 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
vim-jar-0.1.0 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
rspec-expectations-2.3.0 features/expectations/implicit_docstrings.feature
vim-jar-0.0.3 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
vim-jar-0.0.2 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
vim-jar-0.0.1 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/implicit_docstrings.feature
rspec-expectations-2.2.0 features/expectations/implicit_docstrings.feature
rspec-expectations-2.1.0 features/expectations/implicit_docstrings.feature
rspec-expectations-2.0.1 features/expectations/implicit_docstrings.feature
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/implicit_docstrings.feature
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/implicit_docstrings.feature
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/implicit_docstrings.feature
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/implicit_docstrings.feature
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/implicit_docstrings.feature