We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It appears that, when akamai-rspec matchers "fail", they do so by raising an exception, e.g.
which in action looks like this:
1) www.casa.it /vendita should not be cacheable Failure/Error: expect("http://#{domain}/vendita").to_not be_cacheable RuntimeError: X-Check-Cacheable header is: NO expected YES # /usr/local/bundle/gems/akamai_rspec-0.2.4/lib/akamai_rspec/matchers/caching.rb:52:in `x_check_cacheable' # /usr/local/bundle/gems/akamai_rspec-0.2.4/lib/akamai_rspec/matchers/caching.rb:7:in `block (2 levels) in <top (required)>' # ./spec/sample_spec.rb:18:in `block (3 levels) in <top (required)>'
I came across this while attempting to write some akamai-rspec tests for Casa (see https://git.realestate.com.au/mwilliams/casa-akamai-tests).
akamai-rspec
RSpec matchers are supposed to fail by returning false, rather than by raising exceptions.
false
The text was updated successfully, but these errors were encountered:
Thanks Mike, I didn't realise how they were meant to behave - I'll try to get to it within a week.
Sorry, something went wrong.
Thanks @BiancaG. Sing out if you need any help. The RSpec documentation around defining matchers is pretty good, though; see: https://www.relishapp.com/rspec/rspec-expectations/v/2-4/docs/custom-matchers/define-matcher
Note that by design you should be able to use matchers in either a positive or negative sense, e.g.
expect(one_url).to be_cachable expect(another_url).to_not be_cachable
No branches or pull requests
It appears that, when akamai-rspec matchers "fail", they do so by raising an exception, e.g.
which in action looks like this:
I came across this while attempting to write some
akamai-rspec
tests for Casa (see https://git.realestate.com.au/mwilliams/casa-akamai-tests).RSpec matchers are supposed to fail by returning
false
, rather than by raising exceptions.The text was updated successfully, but these errors were encountered: