Sha256: 67c44d67559ffe1642a8b185e95a7d4cfb1e0ba18f0bb22ff1ea9c88a815da0b

Contents?: true

Size: 1.43 KB

Versions: 48

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:
    """ruby
    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:
    """ruby
    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

48 entries across 48 versions & 14 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-expectations-2.14.5/features/implicit_docstrings.feature
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-expectations-2.13.0/features/implicit_docstrings.feature
rspec-expectations-2.99.2 features/implicit_docstrings.feature
dxruby_rp5-0.0.4 spec/vendor/rspec-expectations-2.14.4/features/implicit_docstrings.feature
rspec-expectations-2.99.1 features/implicit_docstrings.feature
rspec-expectations-2.99.0 features/implicit_docstrings.feature
rspec-expectations-2.99.0.rc1 features/implicit_docstrings.feature
rspec-expectations-2.99.0.beta2 features/implicit_docstrings.feature
rspec-expectations-2.14.5 features/implicit_docstrings.feature
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-expectations-2.14.4/features/implicit_docstrings.feature
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/implicit_docstrings.feature
dxruby_rp5-0.0.3 spec/vendor/rspec-expectations-2.14.4/features/implicit_docstrings.feature