test/helper.rb in joint-0.6.0 vs test/helper.rb in joint-0.6.1

- old
+ new

@@ -23,11 +23,12 @@ before = exps.map { |e| eval(e, b) } yield exps.each_with_index do |e, i| error = "#{e.inspect} didn't change by #{difference}" error = "#{message}.\n#{error}" if message - assert_equal(before[i] + difference, eval(e, b), error) + after = eval(e, b) + assert_equal(before[i] + difference, after, error) end end def assert_no_difference(expression, message = nil, &block) assert_difference(expression, 0, message, &block) @@ -42,9 +43,19 @@ end end class Asset include MongoMapper::Document + plugin Joint + + key :title, String + attachment :image + attachment :file + has_many :embedded_assets +end + +class EmbeddedAsset + include MongoMapper::EmbeddedDocument plugin Joint key :title, String attachment :image attachment :file \ No newline at end of file