We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 66c793f + ed3bedc commit 2baf44fCopy full SHA for 2baf44f
spec/rspec/core/invocations_spec.rb
@@ -131,6 +131,11 @@ def run_invocation
131
end
132
133
describe Invocations::PrintVersion do
134
+ before do
135
+ allow(subject).to receive(:require).and_call_original
136
+ allow(subject).to receive(:require).with("rspec/rails/version").and_raise(LoadError)
137
+ end
138
+
139
it "prints the major.minor version of RSpec as a whole" do
140
stub_const("RSpec::Core::Version::STRING", "9.18.23")
141
run_invocation
@@ -162,8 +167,6 @@ def run_invocation
162
167
163
168
164
169
it "indicates a part is not installed if it cannot be loaded" do
165
- expect { require 'rspec/rails/version' }.to raise_error(LoadError)
166
-
170
171
172
expect(out.string).not_to include("rspec-rails")
0 commit comments