Module: ScraperWiki::API::Matchers
- Defined in:
- lib/scraperwiki-api/matchers.rb
Overview
RSpec matchers for ScraperWiki scrapers.
Defined Under Namespace
Classes: CountMatcher, CustomMatcher, DatastoreMatcher, ExceptionMessageMatcher, ExtraKeysMatcher, FieldKeyMatcher, FieldMatcher, HaveBlankValues, HaveIntegerValues, HaveUniqueValues, HaveValuesEndingWith, HaveValuesMatching, HaveValuesOf, HaveValuesStartingWith, HaveValuesWithAtLeastTheKeys, HaveValuesWithAtMostTheKeys, KeysMatcher, LastRunMatcher, MissingKeysMatcher, PrivacyStatusMatcher, RunEventsMatcher, RunIntervalMatcher, ScraperInfoMatcher, SetAnyOf, TableMatcher, TablesMatcher, UserRolesMatcher
Instance Method Summary
collapse
Instance Method Details
#be_editable_by(expected) ⇒ Object
138
139
140
|
# File 'lib/scraperwiki-api/matchers.rb', line 138
def be_editable_by(expected)
UserRolesMatcher.new expected
end
|
#be_private ⇒ Object
116
117
118
|
# File 'lib/scraperwiki-api/matchers.rb', line 116
def be_private
PrivacyStatusMatcher.new 'private'
end
|
#be_protected ⇒ Object
111
112
113
|
# File 'lib/scraperwiki-api/matchers.rb', line 111
def be_protected
PrivacyStatusMatcher.new 'visible'
end
|
#have_a_row_count_of(expected) ⇒ Object
363
364
365
|
# File 'lib/scraperwiki-api/matchers.rb', line 363
def have_a_row_count_of(expected)
CountMatcher.new expected
end
|
#have_a_table(expected) ⇒ Object
253
254
255
|
# File 'lib/scraperwiki-api/matchers.rb', line 253
def have_a_table(expected)
TableMatcher.new expected
end
|
#have_at_least_the_keys(expected) ⇒ Object
311
312
313
|
# File 'lib/scraperwiki-api/matchers.rb', line 311
def have_at_least_the_keys(expected)
MissingKeysMatcher.new expected
end
|
#have_at_most_the_keys(expected) ⇒ Object
335
336
337
|
# File 'lib/scraperwiki-api/matchers.rb', line 335
def have_at_most_the_keys(expected)
ExtraKeysMatcher.new expected
end
|
#have_blank_values ⇒ Object
601
602
603
|
# File 'lib/scraperwiki-api/matchers.rb', line 601
def have_blank_values
HaveBlankValues.new nil
end
|
#have_integer_values ⇒ Object
746
747
748
|
# File 'lib/scraperwiki-api/matchers.rb', line 746
def have_integer_values
HaveIntegerValues.new nil
end
|
#have_run_within(expected) ⇒ Object
233
234
235
|
# File 'lib/scraperwiki-api/matchers.rb', line 233
def have_run_within(expected)
LastRunMatcher.new expected
end
|
#have_unique_values ⇒ Object
689
690
691
|
# File 'lib/scraperwiki-api/matchers.rb', line 689
def have_unique_values
HaveUniqueValues.new nil
end
|
#have_values_ending_with(expected) ⇒ Object
727
728
729
|
# File 'lib/scraperwiki-api/matchers.rb', line 727
def have_values_ending_with(expected)
HaveValuesEndingWith.new expected
end
|
#have_values_matching(expected) ⇒ Object
639
640
641
|
# File 'lib/scraperwiki-api/matchers.rb', line 639
def have_values_matching(expected)
HaveValuesMatching.new expected
end
|
#have_values_of(expected) ⇒ Object
620
621
622
|
# File 'lib/scraperwiki-api/matchers.rb', line 620
def have_values_of(expected)
HaveValuesOf.new expected
end
|
#have_values_starting_with(expected) ⇒ Object
708
709
710
|
# File 'lib/scraperwiki-api/matchers.rb', line 708
def have_values_starting_with(expected)
HaveValuesStartingWith.new expected
end
|
#have_values_with_at_least_the_keys(expected) ⇒ Object
796
797
798
|
# File 'lib/scraperwiki-api/matchers.rb', line 796
def have_values_with_at_least_the_keys(expected)
HaveValuesWithAtLeastTheKeys.new expected
end
|
#have_values_with_at_most_the_keys(expected) ⇒ Object
815
816
817
|
# File 'lib/scraperwiki-api/matchers.rb', line 815
def have_values_with_at_most_the_keys(expected)
HaveValuesWithAtMostTheKeys.new expected
end
|
#never_run ⇒ Object
171
172
173
|
# File 'lib/scraperwiki-api/matchers.rb', line 171
def never_run
RunIntervalMatcher.new :never
end
|
#run(expected) ⇒ Object
166
167
168
|
# File 'lib/scraperwiki-api/matchers.rb', line 166
def run(expected)
RunIntervalMatcher.new expected
end
|
#set_any_of(expected) ⇒ Object
492
493
494
|
# File 'lib/scraperwiki-api/matchers.rb', line 492
def set_any_of(expected)
SetAnyOf.new expected
end
|