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.
ActiveModel::Naming
1 parent b74dace commit f84d02cCopy full SHA for f84d02c
lib/rspec/active_model/mocks/mocks.rb
@@ -88,15 +88,15 @@ def mock_model(string_or_model_class, stubs = {})
88
model_class = Object.const_get(string_or_model_class)
89
else
90
model_class = Object.const_set(string_or_model_class, Class.new do
91
- extend ActiveModel::Naming
+ extend ::ActiveModel::Naming
92
def self.primary_key; :id; end
93
end)
94
end
95
96
model_class = string_or_model_class
97
98
99
- unless model_class.kind_of? ActiveModel::Naming
+ unless model_class.kind_of? ::ActiveModel::Naming
100
raise ArgumentError.new <<-EOM
101
The mock_model method can only accept as its first argument:
102
* A String representing a Class that does not exist
0 commit comments