This repository has been archived by the owner on Oct 27, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only try to load Test::Unit if Test::Unit is defined
- Loading branch information
1 parent
6fa3315
commit 5b163e2
Showing
6 changed files
with
38 additions
and
8 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
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
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
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
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,14 @@ | ||
Story: Test is defined, but not Test::Unit | ||
|
||
As an RSpec user who has my own library named Test (but not Test::Unit) | ||
I want to run examples without getting Test::Unit NameErrors | ||
|
||
Scenario: Run with ruby | ||
Given the file test/spec_including_test_but_not_unit.rb | ||
When I run it with the ruby interpreter | ||
Then the stderr should not match "Test::Unit" | ||
|
||
Scenario: Run with spec | ||
Given the file test/spec_including_test_but_not_unit.rb | ||
When I run it with the spec script | ||
Then the stderr should not match "Test::Unit" |
11 changes: 11 additions & 0 deletions
11
stories/resources/test/spec_including_test_but_not_unit.rb
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,11 @@ | ||
$:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib]) | ||
require 'spec' | ||
|
||
module Test | ||
end | ||
|
||
describe "description" do | ||
it "should description" do | ||
1.should == 1 | ||
end | ||
end |