test/base/test_rule.rb in nanoc-3.7.5 vs test/base/test_rule.rb in nanoc-3.8.0
- old
+ new
@@ -10,6 +10,16 @@
end
def test_apply_to
# TODO: implement
end
+
+ def test_matches
+ regexp = %r</(.*)/(.*)/>
+ identifier = '/anything/else/'
+ expected = ['anything', 'else']
+
+ rule = Nanoc::Rule.new(regexp, :string, Proc.new {})
+
+ assert_equal expected, rule.send(:matches, identifier)
+ end
end