test/base/test_item_array.rb in nanoc-4.4.5 vs test/base/test_item_array.rb in nanoc-4.4.6
- old
+ new
@@ -1,5 +1,7 @@
+require 'helper'
+
class Nanoc::Int::IdentifiableCollectionTest < Nanoc::TestCase
def setup
super
@one = Nanoc::Int::Item.new('Item One', {}, '/one/')
@@ -23,10 +25,10 @@
def test_enumerable
assert_equal @one, @items.find { |i| i.identifier == '/one/' }
end
def test_brackets_with_glob
- @items = Nanoc::Int::IdentifiableCollection.new({ string_pattern_type: 'glob' })
+ @items = Nanoc::Int::IdentifiableCollection.new(string_pattern_type: 'glob')
@items << @one
@items << @two
assert_equal @one, @items['/on*/']
assert_equal @two, @items['/*wo/']