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/spec
Brian McManus 12e788f1d0 Numericality validation of virtual attributes
Commit #18b2859d2522a4866c398b9a32ebc3de4ec79389 broke numericality
validation of virtual attributes in ActiveRecord models. This commit
added a `column_type` method that assumes if `columns_hash` is a thing
then our attribute would be present within it. This is not true for
virtual attributes and leads to:
```
     NoMethodError:
           undefined method `type' for nil:NilClass
         # /Users/bdmac/.gem/ruby/2.2.2/gems/shoulda-matchers-3.0.1/lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb:442:in
         # `column_type'
```
2016-01-07 12:12:16 -07:00
..
acceptance Add ignoring_interference_by_writer to all matchers 2016-01-05 00:58:16 -07:00
support Do not apply .railsrc 2016-01-06 10:21:43 -07:00
unit/shoulda/matchers Numericality validation of virtual attributes 2016-01-07 12:12:16 -07:00
warnings_spy Be better about looking for warnings on Travis 2014-12-16 20:30:05 -07:00
acceptance_spec_helper.rb Extract a common spec helper 2015-10-07 23:32:51 -06:00
doublespeak_spec_helper.rb Extract a common spec helper 2015-10-07 23:32:51 -06:00
report_warnings.rb Remove all Ruby-emitted warnings 2014-07-18 18:00:08 -06:00
spec_helper.rb Always use doc formatter for RSpec by default 2016-01-07 11:50:04 -07:00
unit_spec_helper.rb Add ValidationMatcherScenario for use in tests 2016-01-05 00:58:16 -07:00
warnings_spy.rb Fail build if there are warnings 2015-02-09 10:48:49 -07:00