Class: ScraperWiki::API::Matchers::CountMatcher
Instance Method Summary
collapse
#on
#does_not_match?, #initialize
Instance Method Details
#failure_message ⇒ Object
314
315
316
|
# File 'lib/scraperwiki-api/matchers.rb', line 314
def failure_message
"expected #{@actual['short_name']} to have #{@expected} rows, not #{@actual['datasummary']['tables'][@table]['count']}"
end
|
#matches?(actual) ⇒ Boolean
309
310
311
312
|
# File 'lib/scraperwiki-api/matchers.rb', line 309
def matches?(actual)
super
actual['datasummary']['tables'][@table]['count'] == @expected
end
|
#negative_failure_message ⇒ Object
318
319
320
|
# File 'lib/scraperwiki-api/matchers.rb', line 318
def negative_failure_message
"expected #{@actual['short_name']} to not have #{@expected} rows"
end
|