-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# encoding: utf-8 | ||
|
||
require 'preamble' | ||
|
||
|
||
|
||
describe "The" do | ||
before do | ||
@order = ['1'] | ||
end | ||
|
||
it "has order" do | ||
@order.should == %w(1) | ||
end | ||
|
||
describe "test" do | ||
before do | ||
@order << '2' | ||
end | ||
|
||
it "has order" do | ||
@order.should == %w(1 2) | ||
end | ||
|
||
describe "framework" do | ||
before do | ||
@order << '3' | ||
end | ||
|
||
it "has order" do | ||
@order.should == %w(1 2 3) | ||
end | ||
|
||
it "has order" do | ||
@order.should == %w(1 2 3) | ||
end | ||
end | ||
|
||
it "has order" do | ||
@order.should == %w(1 2) | ||
end | ||
end | ||
end | ||
|
||
# We need to specs to run now, not at exit because we want to inspect | ||
# the outcomes. | ||
|
||
Peck.run | ||
|
||
require 'assert' | ||
|
||
assert(Peck.counter.ran == 5, | ||
"Expected five specification to have been run") | ||
|
||
assert(Peck.counter.passed == 5, | ||
"Expected five specification to have passed") | ||
|
||
assert(Peck.contexts[0].label == "The", | ||
"Expected the title to be ‘The’") | ||
|
||
assert(Peck.contexts[1].label == "The test", | ||
"Expected the title to be ‘The test’") | ||
|
||
assert(Peck.contexts[2].label == "The test framework", | ||
"Expected the title to be ‘The test framework’") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7712547
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo!