Sha256: 7cbce99e4e24deb4c6b21e3a3f660342edd4e7a1640798f4be68de51f92ddff9

Contents?: true

Size: 997 Bytes

Versions: 17

Compression:

Stored size: 997 Bytes

Contents

Feature: attribute of subject

  Scenario: simple attribute
    Given a file named "example_spec.rb" with:
      """
      describe Array do
        its(:size) { should == 0 }
      end
      """
    When I run "rspec example_spec.rb --format documentation"
    Then the output should contain:
      """
      Array
        size
          should == 0
      """

  Scenario: nested attribute
    Given a file named "example_spec.rb" with:
      """
      class Person
        attr_reader :phone_numbers
        def initialize
          @phone_numbers = []
        end
      end

      describe Person do
        subject do
          person = Person.new
          person.phone_numbers << "555-1212"
          person
        end

        its("phone_numbers.first") { should == "555-1212" }
      end
      """
    When I run "rspec example_spec.rb --format documentation"
    Then the output should contain:
      """
      Person
        phone_numbers.first
          should == "555-1212"
      """

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rspec-core-2.0.1 features/subject/attribute_of_subject.feature
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.1.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
gemrage-0.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature
rspec-core-2.0.0 features/subject/attribute_of_subject.feature
rspec-core-2.0.0.rc features/subject/attribute_of_subject.feature
rspec-core-2.0.0.beta.22 features/subject/attribute_of_subject.feature
rspec-core-2.0.0.beta.20 features/subject/attribute_of_subject.feature
rspec-core-2.0.0.beta.19 features/subject/attribute_of_subject.feature