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.
add location() to ExampleProxy and ExampleGroupProxy
- Loading branch information
1 parent
f1177cd
commit cd7b90a
Showing
4 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
require File.dirname(__FILE__) + '/../../spec_helper' | ||
|
||
module Spec | ||
module Example | ||
|
||
describe ExampleProxy do | ||
|
||
describe "#description" do | ||
it "provides the submitted description" do | ||
proxy = ExampleProxy.new("the description") | ||
proxy.description.should == "the description" | ||
end | ||
end | ||
|
||
describe "#update" do | ||
it "updates the description" do | ||
proxy = ExampleProxy.new("old description") | ||
proxy.update("new description") | ||
proxy.description.should == "new description" | ||
end | ||
end | ||
|
||
describe "#options" do | ||
it "provides the submitted options" do | ||
proxy = ExampleProxy.new(:ignore, {:these => :options}) | ||
proxy.options.should == {:these => :options} | ||
end | ||
end | ||
|
||
describe "#backtrace (deprecated - use #location)" do | ||
it "provides the location of the declaration of this group" do | ||
proxy = ExampleProxy.new(:ignore, {}, "path/to/location:37") | ||
proxy.backtrace.should == "path/to/location:37" | ||
end | ||
end | ||
|
||
describe "#location" do | ||
it "provides the location of the declaration of this group" do | ||
proxy = ExampleProxy.new(:ignore, {}, "path/to/location:37") | ||
proxy.location.should == "path/to/location:37" | ||
end | ||
end | ||
|
||
end | ||
|
||
end | ||
end |