Commit Graph

11 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
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
Leo Nikkilä 132ab72d0c Fix typo in `rescue_from` description.
Changes the description message into the imperative mood. Now RSpec’s
output makes more sense:

  ApplicationController
    should rescue from ActiveRecord::RecordInvalid
2015-06-01 00:47:50 -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
Sergey Kuchmistov 198570db2c Prefer protected over private attributes 2014-06-27 14:41:54 -06:00
Elliot Winkler c22d7c89e0 Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
Dmitry Tonkonogov 81b7e8472a rescue_from now works with non-public methods 2014-04-04 11:31:11 -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
Corey Woodcox 1b5e3abdf9 Create a rescue_from matcher for ActionController
This matcher tests that the controller has been set up to rescue from a
specific exception with the ActiveSupport::Rescuable#rescue_from method.
It supports checking for a specific method as well.
2013-06-19 18:55:59 -04:00