diff --git a/spec/helpers/tags_spec.rb b/spec/helpers/tags_spec.rb index e3a0218..6d92a16 100644 --- a/spec/helpers/tags_spec.rb +++ b/spec/helpers/tags_spec.rb @@ -20,22 +20,22 @@ describe 'Kaminari::Helpers' do context "for first page" do subject { Tag.new(helper, :param_name => "user[page]").page_url_for(1) } if ActiveSupport::VERSION::STRING < "3.1.0" - it { should_not match /user\[page\]/ } - it { should match /user\[scope\]=active/ } + it { should_not match(/user\[page\]/) } + it { should match(/user\[scope\]=active/) } else - it { should_not match /user%5Bpage%5D/ } # not match user[page] - it { should match /user%5Bscope%5D=active/ } # match user[scope]=active + it { should_not match(/user%5Bpage%5D/) } # not match user[page] + it { should match(/user%5Bscope%5D=active/) } # match user[scope]=active end end context "for other page" do subject { Tag.new(helper, :param_name => "user[page]").page_url_for(2) } if ActiveSupport::VERSION::STRING < "3.1.0" - it { should match /user\[page\]=2/ } - it { should match /user\[scope\]=active/ } + it { should match(/user\[page\]=2/) } + it { should match(/user\[scope\]=active/) } else - it { should match /user%5Bpage%5D=2/ } # match user[page]=2 - it { should match /user%5Bscope%5D=active/ } # match user[scope]=active + it { should match(/user%5Bpage%5D=2/) } # match user[page]=2 + it { should match(/user%5Bscope%5D=active/) } # match user[scope]=active end end end