test/base/test_item_array.rb in nanoc-3.7.4 vs test/base/test_item_array.rb in nanoc-3.7.5

- old
+ new

@@ -1,9 +1,8 @@ # encoding: utf-8 class Nanoc::ItemArrayTest < Nanoc::TestCase - def setup super @one = Nanoc::Item.new('Item One', {}, '/one/') @two = Nanoc::Item.new('Item Two', {}, '/two/') @@ -227,11 +226,11 @@ assert_equal @one, @items['/one/'] assert_equal 'Item 1', @items[1].raw_content assert_equal 'Item 1', @items['/new/1/'].raw_content end - if Array.new.respond_to?(:keep_if) + if [].respond_to?(:keep_if) def test_keep_if assert_equal @two, @items[1] assert_equal @two, @items['/two/'] @items.keep_if { |i| i.identifier == '/one/' } @@ -287,11 +286,11 @@ assert_equal max, @items['/max/'] assert_equal mona, @items[1] assert_equal mona, @items['/mona/'] end - if Array.new.respond_to?(:select!) + if [].respond_to?(:select!) def test_select_bang assert_equal @two, @items[1] assert_equal @two, @items['/two/'] @items.select! { |i| i.identifier == '/two/' } @@ -328,7 +327,6 @@ assert_equal @one, @items[1] assert_equal @one, @items['/one/'] assert_equal @two, @items[2] assert_equal @two, @items['/two/'] end - end