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, TablesMatcher, UserRolesMatcher
Instance Method Summary
collapse
Instance Method Details
#be_broken ⇒ Object
354
355
356
|
# File 'lib/scraperwiki-api/matchers.rb', line 354
def be_broken
ExceptionMessageMatcher.new nil
end
|
#be_editable_by(expected) ⇒ Object
137
138
139
|
# File 'lib/scraperwiki-api/matchers.rb', line 137
def be_editable_by(expected)
UserRolesMatcher.new expected
end
|
#be_private ⇒ Object
115
116
117
|
# File 'lib/scraperwiki-api/matchers.rb', line 115
def be_private
PrivacyStatusMatcher.new 'private'
end
|
#be_protected ⇒ Object
110
111
112
|
# File 'lib/scraperwiki-api/matchers.rb', line 110
def be_protected
PrivacyStatusMatcher.new 'visible'
end
|
#be_public ⇒ Object
105
106
107
|
# File 'lib/scraperwiki-api/matchers.rb', line 105
def be_public
PrivacyStatusMatcher.new 'public'
end
|
#have_a_row_count_of(expected) ⇒ Object
324
325
326
|
# File 'lib/scraperwiki-api/matchers.rb', line 324
def have_a_row_count_of(expected)
CountMatcher.new expected
end
|
#have_at_least_the_keys(expected) ⇒ Object
285
286
287
|
# File 'lib/scraperwiki-api/matchers.rb', line 285
def have_at_least_the_keys(expected)
MissingKeysMatcher.new expected
end
|
#have_at_most_the_keys(expected) ⇒ Object
304
305
306
|
# File 'lib/scraperwiki-api/matchers.rb', line 304
def have_at_most_the_keys(expected)
.new expected
end
|
#have_blank_values ⇒ Object
558
559
560
|
# File 'lib/scraperwiki-api/matchers.rb', line 558
def have_blank_values
HaveBlankValues.new nil
end
|
#have_integer_values ⇒ Object
703
704
705
|
# File 'lib/scraperwiki-api/matchers.rb', line 703
def have_integer_values
HaveIntegerValues.new nil
end
|
#have_run_within(expected) ⇒ Object
232
233
234
|
# File 'lib/scraperwiki-api/matchers.rb', line 232
def have_run_within(expected)
LastRunMatcher.new expected
end
|
#have_unique_values ⇒ Object
646
647
648
|
# File 'lib/scraperwiki-api/matchers.rb', line 646
def have_unique_values
HaveUniqueValues.new nil
end
|
#have_values_ending_with(expected) ⇒ Object
684
685
686
|
# File 'lib/scraperwiki-api/matchers.rb', line 684
def have_values_ending_with(expected)
HaveValuesEndingWith.new expected
end
|
#have_values_matching(expected) ⇒ Object
596
597
598
|
# File 'lib/scraperwiki-api/matchers.rb', line 596
def have_values_matching(expected)
HaveValuesMatching.new expected
end
|
#have_values_of(expected) ⇒ Object
577
578
579
|
# File 'lib/scraperwiki-api/matchers.rb', line 577
def have_values_of(expected)
HaveValuesOf.new expected
end
|
#have_values_starting_with(expected) ⇒ Object
665
666
667
|
# File 'lib/scraperwiki-api/matchers.rb', line 665
def have_values_starting_with(expected)
HaveValuesStartingWith.new expected
end
|
#have_values_with_at_least_the_keys(expected) ⇒ Object
753
754
755
|
# File 'lib/scraperwiki-api/matchers.rb', line 753
def have_values_with_at_least_the_keys(expected)
HaveValuesWithAtLeastTheKeys.new expected
end
|
#have_values_with_at_most_the_keys(expected) ⇒ Object
772
773
774
|
# File 'lib/scraperwiki-api/matchers.rb', line 772
def have_values_with_at_most_the_keys(expected)
HaveValuesWithAtMostTheKeys.new expected
end
|
#never_run ⇒ Object
170
171
172
|
# File 'lib/scraperwiki-api/matchers.rb', line 170
def never_run
RunIntervalMatcher.new :never
end
|
#run(expected) ⇒ Object
165
166
167
|
# File 'lib/scraperwiki-api/matchers.rb', line 165
def run(expected)
RunIntervalMatcher.new expected
end
|
#set_any_of(expected) ⇒ Object
449
450
451
|
# File 'lib/scraperwiki-api/matchers.rb', line 449
def set_any_of(expected)
SetAnyOf.new expected
end
|