1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Elliot Winkler
afa6a7b666 Update RSpec test style across docs
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]
2016-06-15 18:02:07 -06:00
Elliot Winkler
142366ef16 Refer to Minitest in docs over Test::Unit
Minitest has been used instead of Test::Unit for quite some time now,
let's get with the times.

[ci skip]
2015-09-30 13:18:23 -06:00
Elliot Winkler
535fe05be8 Consolidate set_session and set_flash APIs
* 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
2015-02-09 10:52:51 -07:00
Elliot Winkler
b84ec8cc16 Bring set_session in line with set_flash
* 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
2014-11-21 14:27:44 -07:00
Osamu TAKEUCHI
86fb6b9c1e Fix set_session.to(nil) to no longer be a no-op 2014-08-08 14:23:59 -06:00
Elliot Winkler
12cc7aaace Remove all Ruby-emitted warnings
Run RSpec tests with warnings enabled so we stay on top of this better
in the future.
2014-07-18 18:00:08 -06:00
Elliot Winkler
c22d7c89e0 Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
Christopher Chow
1878e89a13 Update deprecated matcher protocol for RSpec 3.
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.
2013-12-24 22:34:26 +11:00
Brian Shaver
4f8684c6db Rename failure_message and negative_failure_message
* fixes #108 : RSpec 2.10 compatibility
* remove unnecessary attr_readr
2013-03-08 14:49:12 -05:00
Gabe Berke-Williams
af8f9a7bff Use current thoughtbot style in specs 2012-12-26 22:45:54 -05:00
Gabe Berke-Williams
2b98e497f8 Whitespace. 2012-03-30 11:51:28 -04:00
Gabe Berke-Williams
7b3d6d0f86 Continue cleaning up matchers. 2012-03-30 11:50:59 -04:00
Joe Ferris
56b0a0439e Move into the Matchers namespace 2010-12-15 17:34:19 -05:00