Class: ScraperWiki::API::Matchers::RunIntervalMatcher
Instance Method Summary
collapse
Instance Method Details
#failure_message ⇒ Object
148
149
150
151
152
153
154
|
# File 'lib/scraperwiki-api/matchers.rb', line 148
def failure_message
if @expected == -1
"expected #{@actual['short_name']} to never run"
else
"expected #{@actual['short_name']} to run #{@expected}"
end
end
|
#matches?(actual) ⇒ Boolean
143
144
145
146
|
# File 'lib/scraperwiki-api/matchers.rb', line 143
def matches?(actual)
super
actual['run_interval'] == ScraperWiki::API::RUN_INTERVALS[@expected]
end
|
#negative_failure_message ⇒ Object
156
157
158
159
160
161
162
|
# File 'lib/scraperwiki-api/matchers.rb', line 156
def negative_failure_message
if @expected == -1
"expected #{@actual['short_name']} to run at some time"
else
"expected #{@actual['short_name']} to not run #{@expected}"
end
end
|