Open mdub opened 8 years ago
Thanks Mike, I didn't realise how they were meant to behave - I'll try to get to it within a week.
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
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.