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]
* Refactor so they both use SetSessionOrFlashMatcher internally
* Remove `set_session['key']` in favor of `set_session('key')`
* `set_flash['key'].to(nil)` no longer works if set_flash has never been
set
* Deprecate `set_session(:foo)` in favor of `set_session[:foo]`
* Make both #[] and #to optional (`should set_session` simply checks
that the session is non-empty, `should set_session.to('value')` checks
that *any* value is 'value')
* Add support for regexps to #to
* Deprecate `should set_session(...).to(nil)` in favor of using
`should_not set_session`
* Improve failure message
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.