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

52 lines
1.9 KiB
Markdown
Raw Normal View History

2012-06-14 15:40:39 -04:00
# v1.2.0
2012-04-20 11:46:47 -04:00
* `ensure_inclusion_of` now has an `in_array` parameter:
`ensure_inclusion_of(:attr).in_array(['foo', 'bar'])`. It cannot be used with
2012-04-20 11:47:21 -04:00
the `.in_range` option. (vpereira)
2012-04-20 11:46:47 -04:00
* `ensure_in_inclusion_of` with `in_array` will accept `allow_blank(bool)` and `allow_nil(false)`
2012-04-20 14:50:29 -04:00
* Test against Rails 3.2.
2012-04-20 14:56:58 -04:00
* Fix `ensure_length_of` to use all possible I18n error messages.
* `have_db_index.unique(nil)` used to function exactly the same as
`have_db_index` with no unique option. It now functions the same as
`have_db_index.unique(false)`.
2012-06-14 15:40:39 -04:00
* In 1.1.0, `have_sent_email` checked all emails to ensure they matched. It now
checks that only one email matches, which restores 1.0.0 behavior.
2012-04-13 11:02:27 -04:00
# v1.1.0
2012-04-03 20:57:53 -04:00
2012-04-09 20:41:20 -04:00
* Added `only_integer` option to `validate_numericality_of`:
2012-04-03 20:57:53 -04:00
`should validate_numericality_of(:attribute).only_integer`
2012-04-09 20:41:20 -04:00
* Added a `query_the_database` matcher:
2012-04-03 20:57:53 -04:00
`it { should query_the_database(4.times).when_calling(:complicated_method) }`
`it { should query_the_database(4.times).or_less.when_calling(:complicated_method) }`
`it { should_not query_the_database.when_calling(:complicated_method) }`
* Database columns are now correctly checked for primality. E.G., this works
now: `it { should have_db_column(:id).with_options(:primary => true) }`
* The flash matcher can check specific flash keys using [], like so:
`it { should set_the_flash[:alert].to("Password doesn't match") }`
2012-04-09 20:41:20 -04:00
* The `have_sent_email` matcher can check `reply_to`:
2012-04-03 20:57:53 -04:00
` it { should have_sent_email.reply_to([user, other]) }`
2012-04-09 20:41:20 -04:00
* Added `validates_confirmation_of` matcher:
2012-04-03 20:57:53 -04:00
`it { should validate_confirmation_of(:password) }`
2012-04-09 20:41:20 -04:00
* Added `serialize` matcher:
2012-04-03 20:57:53 -04:00
`it { should serialize(:details).as(Hash).as_instance_of(Hash) }`
2012-04-09 20:43:40 -04:00
* shoulda-matchers checks for all possible I18n keys, instead of just
e.g. `activerecord.errors.messages.blank`
2012-04-13 10:58:56 -04:00
* Add `accept_nested_attributes` matcher
2012-04-10 23:23:24 -04:00
* Our very first dependency: ActiveSupport >= 3.0.0