lib/matchers/document/be_stored_in.rb in mongoid-minitest-0.1.5 vs lib/matchers/document/be_stored_in.rb in mongoid-minitest-1.0.0

- old
+ new

@@ -1,21 +1,21 @@ module Mongoid module Matchers class BeStoredInMatcher < Matcher - def initialize(collection_name) + def initialize collection_name @collection_name = collection_name.to_s end - def matches?(subject) + def matches? subject class_of(subject).collection_name.to_s == @collection_name end def description "be stored in #{@collection_name.inspect}" end end - def be_stored_in(collection_name) - BeStoredInMatcher.new(collection_name) + def be_stored_in collection_name + BeStoredInMatcher.new collection_name end end end