Sha256: 3fe153d0bd8bdc1b2a01a999dde81cfdc43589a5a0b72c2d87525cea93d67608
Contents?: true
Size: 943 Bytes
Versions: 32
Compression:
Stored size: 943 Bytes
Contents
Feature: explicit subject You can override the implicit subject using the subject() method. Scenario: subject in top level group Given a file named "top_level_subject_spec.rb" with: """ describe Array, "with some elements" do subject { [1,2,3] } it "should have the prescribed elements" do subject.should == [1,2,3] end end """ When I run "spec top_level_subject_spec.rb" Then the stdout should include "1 example, 0 failures" Scenario: subject in a nested group Given a file named "nested_subject_spec.rb" with: """ describe Array do subject { [1,2,3] } describe "with some elements" do it "should have the prescribed elements" do subject.should == [1,2,3] end end end """ When I run "spec nested_subject_spec.rb" Then the stdout should include "1 example, 0 failures"
Version data entries
32 entries across 32 versions & 11 rubygems