Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Fix issue causing our spec suite to run much slower. #2318

Merged
merged 1 commit into from
Aug 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions spec/rspec/core/invocations_spec.rb
Original file line number Diff line number Diff line change
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