diff --git a/test/helper.rb b/test/helper.rb index a20d236f4..3ee3f2b6f 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -6,6 +6,7 @@ end require 'rubygems' require 'test/unit' +require 'ostruct' gem 'RedCloth', '>= 4.2.1' require 'jekyll' diff --git a/test/test_pager.rb b/test/test_pager.rb index afdf4a2b5..7e153ea49 100644 --- a/test/test_pager.rb +++ b/test/test_pager.rb @@ -23,7 +23,8 @@ class TestPager < Test::Unit::TestCase end should "report that pagination is disabled" do - assert !Pager.pagination_enabled?(@config, OpenStruct.new(name: 'index.html', dir: '/')) + page = OpenStruct.new({ :name => 'index.html', :dir => '/' }) + assert !Pager.pagination_enabled?(@config, page) end end @@ -45,7 +46,8 @@ class TestPager < Test::Unit::TestCase end should "report that pagination is enabled" do - assert Pager.pagination_enabled?(@config, OpenStruct.new(name: 'index.html', dir: '/')) + page = OpenStruct.new({ :name => 'index.html', :dir => '/' }) + assert Pager.pagination_enabled?(@config, page) end context "with 4 posts" do