Class: ScraperWiki::API::Matchers::SetAnyOf
Instance Method Summary
collapse
Instance Method Details
#failure_description ⇒ Object
482
483
484
|
# File 'lib/scraperwiki-api/matchers.rb', line 482
def failure_description
"records didn't set any of #{@expected.join ','}"
end
|
#mismatches ⇒ Object
474
475
476
477
478
479
480
|
# File 'lib/scraperwiki-api/matchers.rb', line 474
def mismatches
items.select do |item|
@expected.all? do |field|
item[field].respond_to?(:empty?) ? item[field].empty? : !item[field]
end
end
end
|
#negative_failure_description ⇒ Object
486
487
488
|
# File 'lib/scraperwiki-api/matchers.rb', line 486
def negative_failure_description
"records set any of #{@expected.join ','}"
end
|