Sha256: 2751f56bb0c7449a7398ecc52dab7916f7205cd20e179889e987c4606892d8ca
Contents?: true
Size: 816 Bytes
Versions: 13
Compression:
Stored size: 816 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 output should contain "1 example, 0 failures" 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 output should contain "1 example, 0 failures"
Version data entries
13 entries across 13 versions & 2 rubygems