From c2681a4f0acfe25830af5fa94ceef34838c39b4d Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 20 Jun 2012 13:21:50 +0900 Subject: [PATCH] "warning: ambiguous first argument" --- spec/helpers/action_view_extension_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/helpers/action_view_extension_spec.rb b/spec/helpers/action_view_extension_spec.rb index 7249b0c..06ce5c6 100644 --- a/spec/helpers/action_view_extension_spec.rb +++ b/spec/helpers/action_view_extension_spec.rb @@ -27,11 +27,11 @@ describe 'Kaminari::ActionViewExtension' do context 'the default behaviour' do subject { helper.link_to_previous_page @users, 'Previous', :params => {:controller => 'users', :action => 'index'} } it { should be_a String } - it { should match /rel="previous"/ } + it { should match(/rel="previous"/) } end context 'overriding rel=' do subject { helper.link_to_previous_page @users, 'Previous', :rel => 'external', :params => {:controller => 'users', :action => 'index'} } - it { should match /rel="external"/ } + it { should match(/rel="external"/) } end end context 'the first page' do @@ -222,8 +222,8 @@ describe 'Kaminari::ActionViewExtension' do subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} } it { should be_a String } - it { should match /rel="next"/ } - it { should_not match /rel="prev"/ } + it { should match(/rel="next"/) } + it { should_not match(/rel="prev"/) } end context 'the middle page' do before do @@ -232,8 +232,8 @@ describe 'Kaminari::ActionViewExtension' do subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} } it { should be_a String } - it { should match /rel="next"/ } - it { should match /rel="prev"/ } + it { should match(/rel="next"/) } + it { should match(/rel="prev"/) } end context 'the last page' do before do @@ -242,8 +242,8 @@ describe 'Kaminari::ActionViewExtension' do subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} } it { should be_a String } - it { should_not match /rel="next"/ } - it { should match /rel="prev"/ } + it { should_not match(/rel="next"/) } + it { should match(/rel="prev"/) } end end end