Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

raise an error if a loaded rspec-2 spec file tries to require 'spec' #94

Closed
dchelimsky opened this Issue · 4 comments

2 participants

@dchelimsky
Owner

No description provided.

@justinko

Patch: http://github.com/justinko/rspec-core/tree/issue-94

It works, but I cannot figure out how to spec it. I left a pending spec in the spec file.

@justinko

I take that back, I did try to spec it by adding this to the example:

module Spec
  module VERSION
    MAJOR = 1
  end
end

And it works, but it breaks two specs in the DRB specs. I assume its because this newly created module is hanging around. So I tried Object.instance_eval { remove_const(:Spec) } to no avail.

@justinko

Raise an error if rspec-1 is loaded.

  • this happens when both rspec-1 and rspec-2 are installed in the same environment, and a "require 'spec'" statement appears somewhere in the code (typically residual from an upgrade from rspec-1 to rspec-2).
  • Closed by 7016d06.
@dchelimsky
Owner

Actually, closed by 6240273, which has the spec implemented and a more informative error message.

@timcharper timcharper referenced this issue from a commit in timcharper/rspec-core
@justinko justinko Raise an error if rspec-1 is loaded.
- this happens when both rspec-1 and rspec-2 are installed in the same
  environment, and a "require 'spec'" statement appears somewhere in the
  code (typically residual from an upgrade from rspec-1 to rspec-2).
- Closes #94.
7016d06
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.