brentd / xray-rails

☠️ A development tool that reveals your UI's bones
MIT License
1.22k stars 79 forks source link

[Enhance] Deprecated RSpec Syntax #91

Closed berniechiu closed 4 years ago

berniechiu commented 6 years ago

Objective

Since I've encountered something like this in new RSpec rails version

Deprecation Warnings:

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /Users/berniechiu/development/ruby_projects/xray-rails/spec/xray/xray_bar_spec.rb:7:in `block (2 levels) in <top (required)>'.

Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /Users/berniechiu/development/ruby_projects/xray-rails/spec/xray/augmentation_spec.rb:5:in `block (2 levels) in <top (required)>'.

I wonder if we can remove it in case it's deprecated some day, thanks~

Feature

Update the newer syntax to keep in-line with current RSpec