To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorimplicit subject
If the first argument to the outermost example group is a class, an instance
of that class is exposed to each example via the subject() method.
- Scenarios
-
- subject in top level group
-
- Given
-
a file named "top_level_subject_spec.rb" with:
describe Array, "when first created" do it "should be empty" do subject.should eq([]) end end
- When
- I run "rspec ./top_level_subject_spec.rb"
- Then
- the output should contain "1 example, 0 failures"
- subject in a nested group
-
- Given
-
a file named "nested_subject_spec.rb" with:
describe Array do describe "when first created" do it "should be empty" do subject.should eq([]) end end end
- When
- I run "rspec nested_subject_spec.rb"
- Then
- the output should contain "1 example, 0 failures"
Last published over 7 years ago by .