mardi 15 décembre 2015

Custome failure messages in Rspec

In my RSpec + Capybara tests, when I'm expecting something but the test fails, I'd like to have some custom messages.

I achieved it with:

it "a test" do
 do_something
 expect(current_path).to eq('/some/path'), "expected path to be 'some_path' but fails"
end

but what I'd like to have is ONLY my custome message, without the Failure/Error message from RSpec

console

Is this possible?

Aucun commentaire:

Enregistrer un commentaire