lib/reek/adapters/spec.rb in reek-1.2.2 vs lib/reek/adapters/spec.rb in reek-1.2.3
- old
+ new
@@ -86,14 +86,12 @@
"Expected #{@sniffer.desc} not to reek of #{@klass}, but got:\n#{report}"
end
end
class ShouldReekOnlyOf < ShouldReekOf # :nodoc:
- include ReekMatcher
-
def matches?(actual)
@sniffer = actual.sniff
- @sniffer.smells_only_of?(@klass, @patterns)
+ @sniffer.num_smells == 1 and @sniffer.has_smell?(@klass, @patterns)
end
def failure_message_for_should
"Expected #{@sniffer.desc} to reek only of #{@klass}, but got:\n#{report}"
end
def failure_message_for_should_not