Commit Graph

18 Commits

Author SHA1 Message Date
Kapil Sachdev b7e02184d9 fix(rubocop): Fix Layout/LineLength
- bump rubocop to v1.0
- Fix Layout/MultilineAssignmentLayout and other remaining offences
- Exculde appraisal generated gemfiles in rubocop
- Replace NON_NUMERIC_VALUE constant with instance method against 
failing test case in  rails <= 5.1 and postgres adapter.
This is a defect in rails where a frozen string is modified in 
https://github.com/rails/rails/blob/v5.1.7/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb#L25
2020-11-03 10:05:25 -07:00
Kapil Sachdev bac4251bc3 fix(rubocop): Remove nested if inside else Style/IfInsideElse [ci skip] 2020-11-03 10:05:25 -07:00
Elliot Winkler 20e3da3a68 Fix presence matcher w/ custom serializer
When using the presence matcher on an attribute that is defined with
`serialize` and using a custom serializer instead of a Rails built-in,
the matcher failed spectacularly. This commit fixes that.
2019-07-27 23:26:36 -06:00
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
Mauro George 32c0e62596 Drop support for RSpec 2 2015-09-22 13:12:46 -06:00
Elliot Winkler 547d8b762f Fix AR matcher tests for Rails 4.2 2014-12-25 00:45:06 -05: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 102ff93311 WIP: continue converting to options hash. 2012-04-24 16:21:23 -05:00
Gabe Berke-Williams 7b3d6d0f86 Continue cleaning up matchers. 2012-03-30 11:50:59 -04: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