aboutsummaryrefslogtreecommitdiffstats
path: root/spec/matchers/disambiguate_attributes.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-05-26 12:41:52 -0300
committerEmilio Tagua <miloops@gmail.com>2009-05-26 12:41:52 -0300
commitc9bbea6115be520dbd47bd30108c5622289deb26 (patch)
treeec418e01954c1bd2dcfebc7fbc8220fb04b50baf /spec/matchers/disambiguate_attributes.rb
parentae1e0ac5e98a7e5a2894d0a431f8c34af6575cae (diff)
parent86364591af807ed3fa4a7304f53e6f3458cb4961 (diff)
downloadrails-c9bbea6115be520dbd47bd30108c5622289deb26.tar.gz
rails-c9bbea6115be520dbd47bd30108c5622289deb26.tar.bz2
rails-c9bbea6115be520dbd47bd30108c5622289deb26.zip
Merge commit 'brynary/master'
Conflicts: lib/arel.rb lib/arel/session.rb
Diffstat (limited to 'spec/matchers/disambiguate_attributes.rb')
-rw-r--r--spec/matchers/disambiguate_attributes.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/matchers/disambiguate_attributes.rb b/spec/matchers/disambiguate_attributes.rb
index bee7d22b0c..bc4a5215d4 100644
--- a/spec/matchers/disambiguate_attributes.rb
+++ b/spec/matchers/disambiguate_attributes.rb
@@ -3,7 +3,7 @@ module DisambiguateAttributesMatcher
def initialize(attributes)
@attributes = attributes
end
-
+
def matches?(actual)
@actual = actual
attribute1, attribute2 = @attributes
@@ -11,18 +11,18 @@ module DisambiguateAttributesMatcher
!@actual[attribute1].descends_from?(attribute2) &&
@actual[attribute2].descends_from?(attribute2)
end
-
+
def failure_message
""
# "expected #{@actual} to disambiguate its attributes"
end
-
+
def negative_failure_message
"expected #{@actual} to not disambiguate its attributes"
end
end
-
+
def disambiguate_attributes(*attributes)
DisambiguateAttributes.new(attributes)
end
-end \ No newline at end of file
+end