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.
1 parent c0acfec commit 64c4958Copy full SHA for 64c4958
lib/rspec/active_model/mocks/mocks.rb
@@ -144,11 +144,9 @@ def self.param_delimiter; "-"; end
144
include ActiveModel::Validations
145
end
146
if defined?(ActiveRecord)
147
- [:save, :update_attributes, :update].each do |key|
148
- if stubs[key] == false
149
- RSpec::Mocks.allow_message(m.errors, :empty?).and_return(false)
150
- RSpec::Mocks.allow_message(m.errors, :blank?).and_return(false)
151
- end
+ if stubs.values_at(:save, :update_attributes, :update).include?(false)
+ RSpec::Mocks.allow_message(m.errors, :empty?).and_return(false)
+ RSpec::Mocks.allow_message(m.errors, :blank?).and_return(false)
152
153
154
0 commit comments