Sha256: a77fc5e0baf40288832854338d8b873abca78a305ebcd492564195ecaf6d9db4

Contents?: true

Size: 586 Bytes

Versions: 29

Compression:

Stored size: 586 Bytes

Contents

Feature: attribute of subject

  In order to get more meaningful failure messages
  As a spec author
  I want RSpec to tell me what attribute a matcher applies
    to when using the its(:attribute) technique

  Scenario: eq matcher fails
    Given a file named "example_spec.rb" with:
    """
    describe "an array" do
      subject { [] }
      its(:size) { should eq(1) } # intentionally fail
    end
    """

    When I run "rspec example_spec.rb -fdoc"
    Then the output should contain "Failure/Error: its(:size) { should eq(1) }"
    And  the output should contain "expected 1"

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
vim-jar-0.1.2 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
vim-jar-0.1.1 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
vim-jar-0.1.0 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
rspec-expectations-2.3.0 features/expectations/attribute_of_subject.feature
vim-jar-0.0.3 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
vim-jar-0.0.2 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
vim-jar-0.0.1 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/features/expectations/attribute_of_subject.feature
rspec-expectations-2.2.0 features/expectations/attribute_of_subject.feature
rspec-expectations-2.1.0 features/expectations/attribute_of_subject.feature
rspec-expectations-2.0.1 features/expectations/attribute_of_subject.feature
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature