forked from rspec/rspec-mocks
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rspec#138 from c42engineering/issue_120
Issue rspec#120
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'spec_helper' | ||
|
||
module RSpec | ||
module Mocks | ||
describe "#any_instance" do | ||
it "doesn't cause an infinite loop when used in conjunction with dup" do | ||
Object.any_instance.stub(:some_method) | ||
o = Object.new | ||
o.some_method | ||
lambda { o.dup.some_method }.should_not raise_error(SystemStackError) | ||
end | ||
end | ||
end | ||
end |