I have a website to be tested for status code, Using curl command to get the status code of the website. Sometimes it is giving 200 and 302 status codes. I am using serverspec to test the website status code. As I am getting 2 status code, I want to use 'or' condition to get it done. How could I use it. Here is my Serverspec test case.
describe command('curl -IL --retry 4 "www.example.com"') do
its(:stdout) { should match '200' or '302' }
end
This one is giving error for me.