{"comment":{"created_at":"2011-10-21T12:40:06Z","body":"What do you expect rspec to do here?","updated_at":"2011-10-21T12:40:06Z","url":"https://api.github.com/repos/rspec/rspec-core/issues/comments/2480754","id":2480754,"user":{"gravatar_id":"5d38ab152e1e3e219512a9859fcd93af","avatar_url":"https://secure.gravatar.com/avatar/5d38ab152e1e3e219512a9859fcd93af?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/dchelimsky","id":1075,"login":"dchelimsky"}},"action":"created","issue":{"number":483,"created_at":"2011-10-21T09:21:07Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Example is the best explanation:\r\n\r\n*spec_helper.rb*:\r\n\r\n    require 'simplecov'  # has \"require 'erb'\" somewhere\r\n    require 'rspec'\r\n\r\n*foo_spec.rb*:\r\n\r\n    require 'foo'\r\n    describe \"Foo\" do\r\n        it \"should evaluate code\" do\r\n            Foo.eval('1+1').should == '2'\r\n        end\r\n    end\r\n\r\n*foo.rb*:\r\n\r\n    # BUG: developer forgot \"require 'erb'\" here ...\r\n\r\n    def eval(code)\r\n        # NameError for \"ERB\" raised in production only!\r\n        ERB.new(\"<%=#{code}%>\").result  \r\n    end\r\n\r\nResult: Specs pass, project is deployed and \"NameError\" occurs in production\r\n\r\nExpected: Specs should fail with \"NameError\" exception.\r\n\r\nDescription: things like ERB, FileUtils,etc shouldn't be available for the code being tested, unless it is explicitly loaded by that code.\r\n\r\nI would write a patch, I'm just making sure I'm not missing something important here.","comments":1,"title":"Prevent \"require\" in \"spec_helper\" from polluting code's namespace","updated_at":"2011-10-21T12:40:06Z","url":"https://api.github.com/repos/rspec/rspec-core/issues/483","id":2013675,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"c0f2dbac5297d75eb31ee0d93c40ecf0","avatar_url":"https://secure.gravatar.com/avatar/c0f2dbac5297d75eb31ee0d93c40ecf0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/e2","id":150197,"login":"e2"},"html_url":"https://github.com/rspec/rspec-core/issues/483","labels":[],"state":"open"},"legacy":{"issue_id":2013675,"comment_id":2480754}}