Class: ScraperWiki::API::Matchers::PrivacyStatusMatcher

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

Instance Method Summary collapse

Methods inherited from CustomMatcher

#does_not_match?, #initialize

Constructor Details

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

Instance Method Details

#failure_messageObject



95
96
97
# File 'lib/scraperwiki-api/matchers.rb', line 95

def failure_message
  "expected #{@actual['short_name']} to be #{@expected}"
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


90
91
92
93
# File 'lib/scraperwiki-api/matchers.rb', line 90

def matches?(actual)
  super
  actual['privacy_status'] == @expected
end

#negative_failure_messageObject



99
100
101
# File 'lib/scraperwiki-api/matchers.rb', line 99

def negative_failure_message
  "expected #{@actual['short_name']} to not be #{@expected}"
end