Created
July 14, 2012 21:34
-
-
Save torbjoernk/3113509 to your computer and use it in GitHub Desktop.
This raises SystemStackError: stack level too deep
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
require "rspec" | |
require "rspec/expectations" | |
require "rspec/mocks" | |
RSpec.configure do |config| | |
end | |
describe "SystemStackError: stack level too deep" do | |
it "is raised by this" do | |
file = "test_file" | |
expected = "this should be written to test_file" | |
File.should_receive( :open ).with( file, "w" ) | |
IO.any_instance.should_receive( :puts ).with( expected ) | |
File.open( file, "w" ) do |f| | |
f.puts expected | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment