Class: ScraperWiki::API::Matchers::ExtraKeysMatcher

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

Instance Method Summary collapse

Methods inherited from KeysMatcher

#failure_message, #matches?, #negative_failure_message

Methods inherited from TablesMatcher

#on

Methods inherited from CustomMatcher

#does_not_match?, #failure_message, #initialize, #matches?, #negative_failure_message

Constructor Details

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

Instance Method Details

#differenceObject



290
291
292
# File 'lib/scraperwiki-api/matchers.rb', line 290

def difference
  @actual['datasummary']['tables'][@table]['keys'] - @expected
end

#failure_predicateObject



294
295
296
# File 'lib/scraperwiki-api/matchers.rb', line 294

def failure_predicate
  'has extra keys'
end

#negative_failure_predicateObject



298
299
300
# File 'lib/scraperwiki-api/matchers.rb', line 298

def negative_failure_predicate
  'has no extra keys'
end