Resolving some RSpec version issues / deprecations

This commit is contained in:
Jeff Casimir 2015-03-26 23:07:35 -06:00
parent d877f84eca
commit 8ca9198971
4 changed files with 5 additions and 7 deletions

View File

@ -1,3 +1,3 @@
module Draper
VERSION = "2.0.0"
VERSION = "2.1.0"
end

View File

@ -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

View File

@ -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

View File

@ -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|