Resolving some RSpec version issues / deprecations
This commit is contained in:
parent
d877f84eca
commit
8ca9198971
|
@ -1,3 +1,3 @@
|
|||
module Draper
|
||||
VERSION = "2.0.0"
|
||||
VERSION = "2.1.0"
|
||||
end
|
||||
|
|
|
@ -531,7 +531,7 @@ module Draper
|
|||
describe "#===" do
|
||||
it "is true when #== is true" do
|
||||
decorator = Decorator.new(Model.new)
|
||||
decorator.stub(:==).with(:anything).and_return(true)
|
||||
allow(decorator).to receive(:==) { true }
|
||||
|
||||
expect(decorator === :anything).to be_truthy
|
||||
end
|
||||
|
@ -549,14 +549,14 @@ module Draper
|
|||
first = Decorator.new('foo')
|
||||
second = Decorator.new('foo')
|
||||
|
||||
expect(first.eql? second).to be_true
|
||||
expect(first.eql? second).to be
|
||||
end
|
||||
|
||||
it "is false when #eql? is false" do
|
||||
first = Decorator.new('foo')
|
||||
second = Decorator.new('bar')
|
||||
|
||||
expect(first.eql? second).to be_false
|
||||
expect(first.eql? second).to_not be
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -566,7 +566,7 @@ module Draper
|
|||
first = Decorator.new(object)
|
||||
second = Decorator.new(object)
|
||||
|
||||
expect(first.hash == second.hash).to be_true
|
||||
expect(first.hash == second.hash).to be
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ require File.expand_path('../../config/environment', __FILE__)
|
|||
require 'rspec/rails'
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.treat_symbols_as_metadata_keys_with_true_values = true
|
||||
config.expect_with(:rspec) {|c| c.syntax = :expect}
|
||||
config.order = :random
|
||||
end
|
||||
|
|
|
@ -5,7 +5,6 @@ require 'action_controller'
|
|||
require 'action_controller/test_case'
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.treat_symbols_as_metadata_keys_with_true_values = true
|
||||
config.expect_with(:rspec) {|c| c.syntax = :expect}
|
||||
config.order = :random
|
||||
config.mock_with :rspec do |mocks|
|
||||
|
|
Loading…
Reference in New Issue