From 7548a245af932f24d02035839d3a2f6b424b7029 Mon Sep 17 00:00:00 2001 From: Nick Sutterer Date: Thu, 8 May 2014 15:29:50 +1000 Subject: [PATCH] add a test for :views_prefix. --- app/views/alternative/kaminari/_paginator.erb | 1 + spec/helpers/action_view_extension_spec.rb | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 app/views/alternative/kaminari/_paginator.erb diff --git a/app/views/alternative/kaminari/_paginator.erb b/app/views/alternative/kaminari/_paginator.erb new file mode 100644 index 0000000..205684e --- /dev/null +++ b/app/views/alternative/kaminari/_paginator.erb @@ -0,0 +1 @@ +

<%= current_page %>

\ No newline at end of file diff --git a/spec/helpers/action_view_extension_spec.rb b/spec/helpers/action_view_extension_spec.rb index 75b3e29..05c2201 100644 --- a/spec/helpers/action_view_extension_spec.rb +++ b/spec/helpers/action_view_extension_spec.rb @@ -15,6 +15,11 @@ describe 'Kaminari::ActionViewExtension', :if => defined?(Rails) do lambda { helper.escape_javascript(helper.paginate @users, :params => {:controller => 'users', :action => 'index'}) }.should_not raise_error end end + + context 'accepts :view_prefixes option' do + subject { helper.paginate @users, :views_prefix => "alternative/" } + it { should eq("

1

") } + end end describe '#link_to_previous_page' do