Sha256: f16f9026551144d35a20cafb1938d82026f349821ade33d0a42bad937c434ae7

Contents?: true

Size: 499 Bytes

Versions: 4

Compression:

Stored size: 499 Bytes

Contents

require 'helper'

class Nanoc::Int::RuleTest < Nanoc::TestCase
  def test_initialize
    # TODO: implement
  end

  def test_applicable_to
    # TODO: implement
  end

  def test_apply_to
    # TODO: implement
  end

  def test_matches
    pattern    = Nanoc::Int::Pattern.from(%r{/(.*)/(.*)/})
    identifier = '/anything/else/'
    expected   = %w[anything else]

    rule = Nanoc::RuleDSL::Rule.new(pattern, :string, proc {})

    assert_equal expected, rule.send(:matches, identifier)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.7.9 test/rule_dsl/test_rule.rb
nanoc-4.7.8 test/rule_dsl/test_rule.rb
nanoc-4.7.7 test/rule_dsl/test_rule.rb
nanoc-4.7.6 test/rule_dsl/test_rule.rb