Skip to content

Commit

Permalink
Properly scoping test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
bear454 committed May 7, 2012
1 parent 7fecbd2 commit 146c608
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/acts_as_diffable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ def test_only_different_attributes_should_be_returned
'admin' => [false, true] }
diff_result = users(:john).diff(users(:jane))

assert_equal diff_expectation.inspect, diff_result.inspect
assert_equal diff_expectation.keys.sort, diff_result.keys.sort
end

def test_singular_associations
diff_expectation = {'group' => { 'name' => ['FirstGroup', 'SecondGroup'] } }
diff_result = users(:jane).diff(users(:jane_in_a_different_group))

assert_equal diff_expectation.inspect, diff_result.inspect
assert_equal diff_expectation, diff_result
end

def test_plural_associations
Expand All @@ -34,6 +34,6 @@ def test_plural_associations
'bar' => {'_delete' => true } } }
diff_result = users(:john).diff(users(:john_with_different_tags))

assert_equal diff_expectation.inspect, diff_result.inspect
assert_equal diff_expectation, diff_result
end
end

0 comments on commit 146c608

Please sign in to comment.