Instead of using
describe Foo do
# ...
end
use
RSpec.describe Foo, type: :model do
# ...
end
instead. This is not exactly official, as the former style still works,
but the latter style is highly suggested in RSpec documentation and the
like, so this is what people are used to.
[ci skip]
Changes the description message into the imperative mood. Now RSpec’s
output makes more sense:
ApplicationController
should rescue from ActiveRecord::RecordInvalid
The methods failure_message_for_should and failure_message_for_should_not
have been updated to failure_message and failure_message_negated respectively.
Alias to the old methods to remain backwards compatibility with RSpec 2.
This matcher tests that the controller has been set up to rescue from a
specific exception with the ActiveSupport::Rescuable#rescue_from method.
It supports checking for a specific method as well.