Gabe Berke-Williams
31b140f530
Get tests passing on 1.8.7.
2012-03-23 14:33:09 -04:00
Matthew Daubert
56de191d4e
Test that exception is thrown in Rails < 3.1
...
AbstractAdapter doesn't provide the required payload information until
3.1. Raising of the exception was moved out of the filter_query method
because the exception was being thrown during evaluation of the
subscribe block which prevented the eventual call to unsubscribe and
potentially failing other unrelated specs.
2012-03-23 09:23:32 -04:00
Matthew Daubert
8e7fbc553b
Explicitly name arguments
2012-03-23 09:23:32 -04:00
Matthew Daubert
558d1df741
Polish failure messages
2012-03-23 09:23:32 -04:00
Matthew Daubert
00a9a68fb1
Added QueryTheDatabaseMatcher
...
This matcher allows you to spec the number of database calls made by a
method.
2012-03-23 09:23:32 -04:00
Mike Bloy
5c173bf1b7
test and bugfix for failing case
2012-03-22 21:28:57 -05:00
Mike Bloy
c863f7e6f0
association_matcher foreign_key refinement
...
https://github.com/thoughtbot/shoulda-matchers/issues/66
has_many and has_one tests failed with the reverse association has a
nonstandard name, (eg "belongs_to :author, :class_name => :User)
corrected by having have_one and have_many association tests check for an
:inverse_of on their association, and use the inverse relationship's
foreign key info if it can be found
2012-03-22 21:27:21 -05:00
Håkon Lerring
9b5e972553
change return-guard into if-else
2012-03-16 17:44:07 -04:00
Håkon Lerring
3b891cf704
Fix failing tests on rails 3.1 and higher
2012-03-16 17:44:07 -04:00
Håkon Lerring
d9906d84ce
Add testing the class of a serializer instance
2012-03-16 17:43:53 -04:00
Tom Milewski
a9a4796110
Update verbiage
2011-11-15 17:30:25 -05:00
Tom Milewski
a3fa2f9bac
Adds the serialize matcher to ActiveRecord matchers.
2011-11-15 17:11:41 -05:00
Markus Schwed
17ac7d5a36
Added class_name option matcher to association_matcher
2011-10-16 14:06:24 +02:00
Mike Burns
293b8aab53
Merge branch 'master' of https://github.com/Hakon/shoulda-matchers
2011-10-14 13:56:01 -04:00
Håkon Lerring
0820901e4b
Added support for testing the :conditions option on associations
2011-09-23 13:19:17 +02:00
Jeff Dutil
69286613d0
Fix documentation typo. Method is named have_readonly_attribute, but documentation refers to have_readonly_attributes.
2011-09-21 19:33:38 -03:00
Prem Sichanugrist
1a3aeec47c
Fix have_db_index_matcher bug on JRuby
...
So matched_index.unique actually returns an integer instead of true and returns nil instead of false in JRuby. This `!!` operator should fix it.
2011-09-18 21:40:51 +07:00
Prem Sichanugrist
a6fa83e18c
Fix whitespace
2011-09-12 17:25:05 +07:00
Oscar Del Ben
7e999d73a6
add order clause
2011-06-16 16:21:57 +02:00
Joel Moss
6b4035c117
Prefer #foreign_key to #primary_key_name when possible for AssociationMatcher#foreign_key
...
Fixes deprecation warning added in Rails 3.1:
https://github.com/rails/rails/blob/v3.1.0.beta1/activerecord/lib/active_record/reflection.rb#L201-208
Closes: https://github.com/thoughtbot/shoulda-matchers/pull/9
2011-05-20 10:22:08 -04:00
Markus Schwed
2a54fdb28d
Seperate ActiveRecord and ActiveModel related matchers
2011-05-06 15:56:36 +02:00
knapo
7f72f4a478
Change the way of translating default_error_message by using :default I18n.translation options instead of throwing I18n::MissingTranslationData
2011-03-17 14:02:39 +01:00
Ryan McGeary
70b706e85a
Updated docs for the validate_format_of matcher
...
* Reflects correct default error message (:invalid)
* Also added extra tests for invalid formats
2011-02-26 09:11:47 -05:00
Justin Case
5de1e7788b
The format validator uses :invalid key by default, not :blank.
...
https://github.com/thoughtbot/shoulda/issues/#issue/119 by adrpac
2011-02-26 09:32:43 +01:00
John Mileham
3c0aea25fa
readonly_attributes are now a Set instead of Array
2011-02-23 11:13:59 -05:00
Tristan Dunn
3daca5b601
Support validates_presence_of with a class using ActiveModel::Validations.
2011-01-24 11:19:34 -05:00
Joe Ferris
56b0a0439e
Move into the Matchers namespace
2010-12-15 17:34:19 -05:00