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

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

Instance Method Summary collapse

Constructor Details

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

Instance Method Details

#exception_messageObject



379
380
381
# File 'lib/scraperwiki-api/matchers.rb', line 379

def exception_message
  last_run['exception_message']
end

#failure_messageObject



383
384
385
# File 'lib/scraperwiki-api/matchers.rb', line 383

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

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


374
375
376
377
# File 'lib/scraperwiki-api/matchers.rb', line 374

def matches?(actual)
  super
  exception_message
end

#negative_failure_messageObject



387
388
389
# File 'lib/scraperwiki-api/matchers.rb', line 387

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