From 22827ad6f2575479a5518a2e56fe7fef4d18b8d5 Mon Sep 17 00:00:00 2001 From: Cliff Braton Date: Mon, 27 Mar 2017 22:19:18 -0500 Subject: [PATCH] Fix deprecations and possible false positive issue in tests. (#781) --- spec/draper/view_context/build_strategy_spec.rb | 2 +- spec/dummy/config/boot.rb | 2 +- spec/dummy/fast_spec/post_decorator_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/draper/view_context/build_strategy_spec.rb b/spec/draper/view_context/build_strategy_spec.rb index a316b57..f6a3e36 100644 --- a/spec/draper/view_context/build_strategy_spec.rb +++ b/spec/draper/view_context/build_strategy_spec.rb @@ -39,7 +39,7 @@ module Draper expect(controller.request).to be_nil strategy.call expect(controller.request).to be_an ActionController::TestRequest - expect(controller.params).to eq({}) + expect(controller.params.to_h).to eq({}) # sanity checks expect(controller.view_context.request).to be controller.request diff --git a/spec/dummy/config/boot.rb b/spec/dummy/config/boot.rb index 4b06b02..dd8365e 100644 --- a/spec/dummy/config/boot.rb +++ b/spec/dummy/config/boot.rb @@ -2,4 +2,4 @@ require 'rubygems' 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']) diff --git a/spec/dummy/fast_spec/post_decorator_spec.rb b/spec/dummy/fast_spec/post_decorator_spec.rb index ff6abb1..1322fa4 100644 --- a/spec/dummy/fast_spec/post_decorator_spec.rb +++ b/spec/dummy/fast_spec/post_decorator_spec.rb @@ -32,6 +32,6 @@ describe PostDecorator do end 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