Fix deprecations and possible false positive issue in tests. (#781)
This commit is contained in:
parent
a3fdede858
commit
22827ad6f2
|
@ -39,7 +39,7 @@ module Draper
|
||||||
expect(controller.request).to be_nil
|
expect(controller.request).to be_nil
|
||||||
strategy.call
|
strategy.call
|
||||||
expect(controller.request).to be_an ActionController::TestRequest
|
expect(controller.request).to be_an ActionController::TestRequest
|
||||||
expect(controller.params).to eq({})
|
expect(controller.params.to_h).to eq({})
|
||||||
|
|
||||||
# sanity checks
|
# sanity checks
|
||||||
expect(controller.view_context.request).to be controller.request
|
expect(controller.view_context.request).to be controller.request
|
||||||
|
|
|
@ -2,4 +2,4 @@ require 'rubygems'
|
||||||
|
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
||||||
|
|
||||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
||||||
|
|
|
@ -32,6 +32,6 @@ describe PostDecorator do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can't be passed implicitly to url_for" do
|
it "can't be passed implicitly to url_for" do
|
||||||
expect{decorator.link}.to raise_error
|
expect{decorator.link}.to raise_error ArgumentError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue