spec/nanoc/base/entities/pattern_spec.rb in nanoc-4.8.11 vs spec/nanoc/base/entities/pattern_spec.rb in nanoc-4.8.12

- old
+ new

@@ -19,9 +19,15 @@ pattern = described_class.from(pattern) expect(pattern.match?('/foo/xaz/bar.html')).to eql(true) expect(pattern.match?('/foo/xyz/bar.html')).to eql(false) end + it 'converts from symbol' do + pattern = described_class.from(:'/foo/x[ab]z/bar.*') + expect(pattern.match?('/foo/xaz/bar.html')).to eql(true) + expect(pattern.match?('/foo/xyz/bar.html')).to eql(false) + end + it 'errors on other inputs' do expect { described_class.from(123) }.to raise_error(ArgumentError) end it 'errors with a proper error message on other inputs' do