Permalink
Browse files

Some of the matchers were inconsistently including Match at bottom of…

… class.

Just cleaning up the code to be consistent.
  • Loading branch information...
1 parent 3c0e2b0 commit bab129849ba71ceaab68a14f3761b57ef00483a0 @coreyhaines committed Jul 1, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/ramcrest/anything.rb
  2. +2 −2 lib/ramcrest/has_attribute.rb
View
4 lib/ramcrest/anything.rb
@@ -9,15 +9,15 @@ def anything
end
class Matcher
+ include Ramcrest::Match
+
def matches?(actual)
success
end
def description
"anything"
end
-
- include Ramcrest::Match
end
end
end
View
4 lib/ramcrest/has_attribute.rb
@@ -10,6 +10,8 @@ def has_attribute(attribute_name, value_matcher = Ramcrest::Anything.anything())
end
class Matcher
+ include Ramcrest::Match
+
def initialize(attribute_name, value_matcher)
@attribute_name = attribute_name
@value_matcher = value_matcher
@@ -31,8 +33,6 @@ def matches?(actual)
def description
"an object with an attribute named '#{@attribute_name}' and value #{@value_matcher.description}"
end
-
- include Ramcrest::Match
end
end
end

0 comments on commit bab1298

Please sign in to comment.