Skip to content

Instantly share code, notes, and snippets.

@johnnymo87
Created November 15, 2014 18:35
Show Gist options
  • Select an option

  • Save johnnymo87/98388c9bc295bbb953ca to your computer and use it in GitHub Desktop.

Select an option

Save johnnymo87/98388c9bc295bbb953ca to your computer and use it in GitHub Desktop.
RSpec 2.99 deprecation warnings
Deprecation Warnings: [35/1389]
Use of rspec-core's `its` method is deprecated. Use the rspec-its gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/mailers/admin_mailer_spec.rb:6:in `block in <top (required)>'.
Use of rspec-core's `its` method is deprecated. Use the rspec-its gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/mailers/admin_mailer_spec.rb:7:in `block in <top (required)>'.
Use of rspec-core's `its` method is deprecated. Use the rspec-its gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/mailers/admin_mailer_spec.rb:8:in `block in <top (required)>'.
Too many uses of deprecated 'Use of rspec-core's `its` method'. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.
`and_return` on a negative message expectation is deprecated. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/volunteer_ops_controller_spec.rb:216:in `block (4 levels) in <top (required)>
'.
`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or `be false` (for exact `== false` equality) instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/applica
tion_controller_spec.rb:10:in `block (2 levels) in <top (required)>'.
`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or `be false` (for exact `== false` equality) instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/applica
tion_controller_spec.rb:18:in `block (2 levels) in <top (required)>'.
`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or `be false` (for exact `== false` equality) instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/applica
tion_controller_spec.rb:124:in `block (4 levels) in <top (required)>'.
Too many uses of deprecated '`be_false`'. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.
`be_true` is deprecated. Use `be_truthy` (for Ruby's conditional semantics) or `be true` (for exact `== true` equality) instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/applicatio
n_controller_spec.rb:7:in `block (2 levels) in <top (required)>'.
`be_true` is deprecated. Use `be_truthy` (for Ruby's conditional semantics) or `be true` (for exact `== true` equality) instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/applicatio
n_controller_spec.rb:15:in `block (2 levels) in <top (required)>'.
`be_true` is deprecated. Use `be_truthy` (for Ruby's conditional semantics) or `be true` (for exact `== true` equality) instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/applicatio
n_controller_spec.rb:82:in `block (3 levels) in <top (required)>'.
Too many uses of deprecated '`be_true`'. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.
`mock_model` is deprecated. Use the `rspec-activemodel-mocks` gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/application_controller_spec.rb:44:in `block (2 levels) in <top (
required)>'.
`mock_model` is deprecated. Use the `rspec-activemodel-mocks` gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/organisation_reports_controller_spec.rb:6:in `block (2 levels) i
n <top (required)>'.
`mock_model` is deprecated. Use the `rspec-activemodel-mocks` gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/organisations_controller_spec.rb:15:in `double_organisation'.
Too many uses of deprecated '`mock_model`'. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.
`stub_model` is deprecated. Use the `rspec-activemodel-mocks` gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/volunteer_ops_controller_spec.rb:13:in `block (2 levels) in <top
(required)>'.
`stub_model` is deprecated. Use the `rspec-activemodel-mocks` gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/volunteer_ops_controller_spec.rb:31:in `block (3 levels) in <top
(required)>'.
`stub_model` is deprecated. Use the `rspec-activemodel-mocks` gem instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/controllers/volunteer_ops_controller_spec.rb:39:in `block (3 levels) in <top
(required)>'.
Too many uses of deprecated '`stub_model`'. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.
--------------------------------------------------------------------------------
rspec-rails 3 will no longer automatically infer an example group's spec type
from the file location. You can explicitly opt-in to this feature using this
snippet:
RSpec.configure do |config|
config.infer_spec_type_from_file_location!
end
If you wish to manually label spec types via metadata you can safely ignore
this warning and continue upgrading to RSpec 3 without addressing it.
--------------------------------------------------------------------------------
`expect(record).to have(1).errors_on(:title)` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like
record.valid?
expect(record.errors[:title].size).to eq(1)
instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/models/volunteer_op_spec.rb:6:in `block (2 levels) in <top (required)>'.
`expect(record).to have(1).errors_on(:description)` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like
record.valid?
expect(record.errors[:description].size).to eq(1)
instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/models/volunteer_op_spec.rb:11:in `block (2 levels) in <top (required)>'.
`expect(record).to have(1).error_on(:organisation_id)` is deprecated. Use the rspec-collection_matchers gem or replace your expectation with something like
record.valid?
expect(record.errors[:organisation_id].size).to eq(1)
instead. Called from /Users/johnnymo87/ruby/LocalSupport/spec/models/volunteer_op_spec.rb:16:in `block (2 levels) in <top (required)>'.
If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment