Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1074 from rspec/remove_rspec_1_error
Remove RSpec 1 load error handling.
  • Loading branch information
JonRowe committed Sep 14, 2013
2 parents c1f3195 + 022838a commit 3900da7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
17 changes: 0 additions & 17 deletions lib/rspec/core/configuration.rb
Expand Up @@ -848,7 +848,6 @@ def configure_expectation_framework
def load_spec_files
files_to_run.uniq.each {|f| load File.expand_path(f) }
@spec_files_loaded = true
raise_if_rspec_1_is_loaded
end

# @private
Expand Down Expand Up @@ -1012,22 +1011,6 @@ def assert_no_example_groups_defined(config_option)
end
end

def raise_if_rspec_1_is_loaded
if defined?(Spec) && defined?(Spec::VERSION::MAJOR) && Spec::VERSION::MAJOR == 1
raise <<-MESSAGE
#{'*'*80}
You are running rspec-2, but it seems as though rspec-1 has been loaded as
well. This is likely due to a statement like this somewhere in the specs:
require 'spec'
Please locate that statement, remove it, and try again.
#{'*'*80}
MESSAGE
end
end

def output_to_tty?(output=output_stream)
tty? || (output.respond_to?(:tty?) && output.tty?)
end
Expand Down
10 changes: 0 additions & 10 deletions spec/rspec/core/configuration_spec.rb
Expand Up @@ -80,16 +80,6 @@ def absolute_path_to(dir)
config.should_receive(:load).once
config.load_spec_files
end

context "with rspec-1 loaded" do
before { stub_const("Spec::VERSION::MAJOR", 1) }

it "raises with a helpful message" do
expect {
config.load_spec_files
}.to raise_error(/rspec-1 has been loaded/)
end
end
end

describe "#mock_framework" do
Expand Down

0 comments on commit 3900da7

Please sign in to comment.