Class: ScraperWiki::API::Matchers::HaveValuesOf

Inherits:
FieldMatcher 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_predicateObject



610
611
612
# File 'lib/scraperwiki-api/matchers.rb', line 610

def failure_predicate
  "aren't one of #{@expected.join ', '}"
end

#match?(v) ⇒ Boolean

Returns:

  • (Boolean)


606
607
608
# File 'lib/scraperwiki-api/matchers.rb', line 606

def match?(v)
  @expected.include? v
end

#negative_failure_predicateObject



614
615
616
# File 'lib/scraperwiki-api/matchers.rb', line 614

def negative_failure_predicate
  "are one of #{@expected.join ', '}"
end