spec/mongoid_spec.rb in glebtv-carrierwave-mongoid-0.6.5 vs spec/mongoid_spec.rb in glebtv-carrierwave-mongoid-0.7.0
- old
+ new
@@ -545,11 +545,11 @@
embedded_in :mongo_user
end
@class.class_eval do
embeds_one :mongo_location
- default_scope where(:always_false => false)
+ default_scope -> { where(:always_false => false) }
end
@doc = @class.new
@embedded_doc = @doc.build_mongo_location
@embedded_doc.image = stub_file('old.jpeg')
@@ -640,10 +640,10 @@
embedded_in :mongo_user
end
@class.class_eval do
embeds_many :mongo_locations
- default_scope where(:always_false => false)
+ default_scope -> { where(:always_false => false) }
end
@doc = @class.new
@embedded_doc = @doc.mongo_locations.build
@embedded_doc.image = stub_file('old.jpeg')