I'm new to ServerSpec, Rspec, ruby so don't have much knowledge of the specifics of the grammar available. I'd like to write a test that does something like:
describe file("foo") do
it { should_be_owned_by 'bill' or 'ted' }
end
That test runs but seems to only check the first owner and not the second.
Is there a standard way to perform a test where there may be multiple acceptable values?
Thanks
I can not find it in the official
file
documentation, but you can use a grep regular expression pattern there:Since RSpec
3.0
you can also use.or
to make compound expectations: