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

Inherits:
ScraperInfoMatcher 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

#failure_messageObject



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

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

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#negative_failure_messageObject



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

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