summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2018-03-07 21:53:30 +0000
committerThe Bundler Bot <bot@bundler.io>2018-03-07 21:53:30 +0000
commit1e8ce587798edcc75f72cb89eea5a2a425bb579c (patch)
treec3fc74aaf3134ff7e4cece9f61bc10723bd7bf4b
parentc9fa5359c9b320d0c96d062d19f730e912a6277a (diff)
parent08e976f597d5262877e8a77dbac4f04d0a334b04 (diff)
downloadbundler-1e8ce587798edcc75f72cb89eea5a2a425bb579c.tar.gz
Auto merge of #6326 - bundler:seg-disable-expectations-on-nil, r=colby-swandale
Raise an error when attempting to set an expectation on nil Thanks so much for the contribution! To make reviewing this PR a bit easier, please fill out answers to the following questions. ### What was the end-user problem that led to this PR? The problem was we could accidentally set an expectation on `nil`, leading to an RSpec warning ### What was your diagnosis of the problem? My diagnosis was we should just error when we do so
-rw-r--r--spec/spec_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 18ba45da2c..228b9e5aa3 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -114,6 +114,10 @@ RSpec.configure do |config|
c.syntax = :expect
end
+ config.mock_with :rspec do |mocks|
+ mocks.allow_message_expectations_on_nil = false
+ end
+
config.before :all do
build_repo1
end