Class: Reek::Spec::ShouldReek

Inherits:
Object
  • Object
show all
Defined in:
lib/reek/spec.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#failure_message_for_shouldObject



48
49
50
# File 'lib/reek/spec.rb', line 48

def failure_message_for_should
  "Expected source to reek, but it didn't"
end

#failure_message_for_should_notObject



51
52
53
# File 'lib/reek/spec.rb', line 51

def failure_message_for_should_not
  "Expected no smells, but got:\n#{@source.report}"
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/reek/spec.rb', line 44

def matches?(actual)
  @source = actual.to_source
  @source.smelly?
end