File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -177,13 +177,13 @@ en:
177177 https://docs.mongodb.com/mongoid/current/reference/fields/#custom-field-options"
178178 invalid_field_type :
179179 message : " Invalid field type %{type_inspection} for field '%{field}' on model '%{klass}'."
180- summary : " Model '%{klass}' defines a field '%{field}' with an unknown :type value
180+ summary : " Model '%{klass}' declares a field '%{field}' with an unknown :type value
181181 %{type_inspection}. This value is neither present in Mongoid's default type mapping,
182182 nor defined in a custom field type mapping."
183183 resolution : " Please provide a valid :type value for the field. If you
184184 meant to define a custom field type, please do so first as follows:\n\n
185185 \_\_ Mongoid::Fields.configure do\n
186- \_\_\_\_ type %{type_inspection}, YourTypeClass
186+ \_\_\_\_ define_type %{type_inspection}, YourTypeClass
187187 \_\_ end\n
188188 \_\_ class %{klass}\n
189189 \_\_\_\_ include Mongoid::Document\n
Original file line number Diff line number Diff line change 2323
2424 it "contains the summary in the message" do
2525 expect ( error . message ) . to include (
26- "Model 'Person' defines a field 'first_name' with an unknown :type value :stringgy."
26+ "Model 'Person' declares a field 'first_name' with an unknown :type value :stringgy."
2727 )
2828 end
2929 end
4141
4242 it "contains the summary in the message" do
4343 expect ( error . message ) . to include (
44- %q,Model 'Person' defines a field 'first_name' with an unknown :type value "stringgy".,
44+ %q,Model 'Person' declares a field 'first_name' with an unknown :type value "stringgy".,
4545 )
4646 end
4747 end
Original file line number Diff line number Diff line change 369369 it 'raises InvalidFieldType' do
370370 lambda do
371371 klass . field ( :test , type : :bogus )
372- end . should raise_error ( Mongoid ::Errors ::InvalidFieldType , /defines a field : test with an unknown :type value :bogus/ )
372+ end . should raise_error ( Mongoid ::Errors ::InvalidFieldType , /declares a field ' test' with an unknown :type value :bogus/ )
373373 end
374374 end
375375
376376 context 'when using an unknown string' do
377377 it 'raises InvalidFieldType' do
378378 lambda do
379379 klass . field ( :test , type : 'bogus' )
380- end . should raise_error ( Mongoid ::Errors ::InvalidFieldType , /defines a field : test with an unknown :type value "bogus"/ )
380+ end . should raise_error ( Mongoid ::Errors ::InvalidFieldType , /declares a field ' test' with an unknown :type value "bogus"/ )
381381 end
382382 end
383383 end
You can’t perform that action at this time.
0 commit comments