Sha256: 85bf6a77fe958b6f838fc9534f926084d57ef3c9cd4b47e8914ac8d810864436

Contents?: true

Size: 782 Bytes

Versions: 47

Compression:

Stored size: 782 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:
      """ruby
      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:
      """ruby
      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

47 entries across 47 versions & 13 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/subject/implicit_receiver.feature
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/features/subject/implicit_receiver.feature
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/subject/implicit_receiver.feature
rspec-core-2.14.8 features/subject/implicit_receiver.feature
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/features/subject/implicit_receiver.feature
tuktuk-rails-0.0.10 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature
tuktuk-rails-0.0.9 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature
tuktuk-rails-0.0.8 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature
tuktuk-rails-0.0.7 vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature
dxruby_rp5-0.0.2 spec/vendor/rspec-core-2.14.7/features/subject/implicit_receiver.feature