Permalink
Browse files

Add test for attribute inclusion and exclusion.

  • Loading branch information...
1 parent 65529a4 commit ea839b22879af67bc46fda8f7681c1097958217c @tim committed Apr 16, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 test.rb
View
@@ -70,4 +70,10 @@ def test_diff_against_hash
assert_diff @bob, {:name => 'joe'}, {:name => ['bob', 'joe']}
end
+ def test_inclusion_and_exclusion
+ Person.diff :include => [:id], :exclude => [:email_address]
+
+ assert_diff @alice, @bob, {:id => [1, 2], :name => %w( alice bob )}
+ end
+
end

0 comments on commit ea839b2

Please sign in to comment.