From 1eb1643fb1ee8346a8203e64b1b28ed5d6b3fa58 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 24 Aug 2015 15:37:00 +0900 Subject: [PATCH] assign_parameters takes 6 arguments since https://github.com/rails/rails/commit/f6232a5 --- spec/helpers/tags_spec.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spec/helpers/tags_spec.rb b/spec/helpers/tags_spec.rb index ff48678..8c7fd07 100644 --- a/spec/helpers/tags_spec.rb +++ b/spec/helpers/tags_spec.rb @@ -4,7 +4,11 @@ include Kaminari::Helpers describe 'Kaminari::Helpers' do describe 'Tag' do describe '#page_url_for', :if => defined?(Rails) do - before { helper.request.assign_parameters(_routes, "users", "index") } + if ActionPack::VERSION::STRING > '5' + before { helper.request.assign_parameters(_routes, "users", "index", {}, '', []) } + else + before { helper.request.assign_parameters(_routes, "users", "index") } + end context "for first page" do subject { Tag.new(helper).page_url_for(1) } @@ -18,8 +22,10 @@ describe 'Kaminari::Helpers' do end context "with a friendly route setting" do - before do - helper.request.assign_parameters(_routes, "addresses", "index", :page => 3) + if ActionPack::VERSION::STRING > '5' + before { helper.request.assign_parameters(_routes, "addresses", "index", {:page => 3}, '', []) } + else + before { helper.request.assign_parameters(_routes, "addresses", "index", :page => 3) } end context "for first page" do