This test depends on ActionView

This commit is contained in:
Akira Matsuda 2016-12-14 14:00:37 +09:00
parent 56e34191d3
commit d1f12423e1
1 changed files with 57 additions and 55 deletions

View File

@ -1,7 +1,8 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'test_helper' require 'test_helper'
class PaginatorTagsTest < ActionView::TestCase if defined? ActionView
class PaginatorTagsTest < ActionView::TestCase
# A test paginator that can detect instantiated tags inside # A test paginator that can detect instantiated tags inside
class TagSpy < Kaminari::Helpers::Paginator class TagSpy < Kaminari::Helpers::Paginator
def initialize(*) def initialize(*)
@ -68,4 +69,5 @@ class PaginatorTagsTest < ActionView::TestCase
assert_equal [:first_page, :prev_page, 1, :gap, 9, 10], tags_for(User.page(10).per(2)) assert_equal [:first_page, :prev_page, 1, :gap, 9, 10], tags_for(User.page(10).per(2))
end end
end end
end
end end