Sha256: 50add5655292a78a50ba0eea716fe7ff9126d11620f3af07a27ab0bbfacc7aa8

Contents?: true

Size: 774 Bytes

Versions: 27

Compression:

Stored size: 774 Bytes

Contents

Feature: implicit receiver

  When should() is called in an example without an explicit receiver, it is
  invoked against the subject (explicit or implicit).

  Scenario: implicit subject
    Given a file named "example_spec.rb" with:
      """
      describe Array do
        describe "when first created" do
          it { should be_empty }
        end
      end
      """
    When I run `rspec example_spec.rb`
    Then the examples should all pass

  Scenario: explicit subject
    Given a file named "example_spec.rb" with:
      """
      describe Array do
        describe "with 3 items" do
          subject { [1,2,3] }
          it { should_not be_empty }
        end
      end
      """
    When I run `rspec example_spec.rb`
    Then the examples should all pass

Version data entries

27 entries across 25 versions & 4 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/rspec-core-2.8.0/features/subject/implicit_receiver.feature
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/rspec-core-2.8.0/features/subject/implicit_receiver.feature
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-core-2.8.0/features/subject/implicit_receiver.feature
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-core-2.8.0/features/subject/implicit_receiver.feature
horseman-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
rspec-core-2.8.0 features/subject/implicit_receiver.feature
nutshell-crm-0.0.6.alpha vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
rspec-core-2.8.0.rc2 features/subject/implicit_receiver.feature
nutshell-crm-0.0.5 vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
nutshell-crm-0.0.4 vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
nutshell-crm-0.0.3 vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
nutshell-crm-0.0.2 vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
nutshell-crm-0.0.1 vendor/bundle/gems/rspec-core-2.7.1/features/subject/implicit_receiver.feature
rspec-core-2.8.0.rc1 features/subject/implicit_receiver.feature
rspec-core-2.7.1 features/subject/implicit_receiver.feature
rspec-core-2.7.0 features/subject/implicit_receiver.feature
rspec-core-2.7.0.rc1 features/subject/implicit_receiver.feature
rspec-core-2.6.4 features/subject/implicit_receiver.feature