Class: ScraperWiki::API::Matchers::ExceptionMessageMatcher

Inherits:
RunEventsMatcher show all
Defined in:
lib/scraperwiki-api/matchers.rb

Instance Method Summary collapse

Methods inherited from RunEventsMatcher

#last_run

Methods inherited from CustomMatcher

#does_not_match?, #initialize

Constructor Details

This class inherits a constructor from ScraperWiki::API::Matchers::CustomMatcher

Instance Method Details

#exception_messageObject



340
341
342
# File 'lib/scraperwiki-api/matchers.rb', line 340

def exception_message
  last_run['exception_message']
end

#failure_messageObject



344
345
346
# File 'lib/scraperwiki-api/matchers.rb', line 344

def failure_message
  "#{@actual['short_name']} is broken: #{exception_message}"
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


335
336
337
338
# File 'lib/scraperwiki-api/matchers.rb', line 335

def matches?(actual)
  super
  exception_message
end

#negative_failure_messageObject



348
349
350
# File 'lib/scraperwiki-api/matchers.rb', line 348

def negative_failure_message
  "#{@actual['short_name']} isn't broken: #{exception_message}"
end