Skip to content

Commit

Permalink
Merge pull request rspec#2318 from rspec/myron/address-slowness
Browse files Browse the repository at this point in the history
Fix issue causing our spec suite to run much slower.
  • Loading branch information
JonRowe committed Aug 25, 2016
2 parents 910eb7f + 21f2e91 commit 2a6bff1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/rspec/core/invocations_spec.rb
Expand Up @@ -131,6 +131,11 @@ def run_invocation
end

describe Invocations::PrintVersion do
before do
allow(subject).to receive(:require).and_call_original
allow(subject).to receive(:require).with("rspec/rails/version").and_raise(LoadError)
end

it "prints the major.minor version of RSpec as a whole" do
stub_const("RSpec::Core::Version::STRING", "9.18.23")
run_invocation
Expand Down Expand Up @@ -162,8 +167,6 @@ def run_invocation
end

it "indicates a part is not installed if it cannot be loaded" do
expect { require 'rspec/rails/version' }.to raise_error(LoadError)

run_invocation

expect(out.string).not_to include("rspec-rails")
Expand Down

0 comments on commit 2a6bff1

Please sign in to comment.