Sha256: ef08dfaaa5eb05b0100f20305eee0760f2b5db63cbf51ea945cd470c9635b90a
Contents?: true
Size: 1011 Bytes
Versions: 7
Compression:
Stored size: 1011 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: """ require 'rspec/expectations' 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 match "1 example, 0 failures" Scenario: subject in a nested group Given a file named "nested_subject_spec.rb" with: """ require 'rspec/expectations' 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 match "1 example, 0 failures"
Version data entries
7 entries across 7 versions & 1 rubygems