Sha256: aa1ce0ecfec2998be54c80056c9d3ad72df65d2ee545f89404a1ae0711029473

Contents?: true

Size: 481 Bytes

Versions: 31

Compression:

Stored size: 481 Bytes

Contents

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

31 entries across 31 versions & 1 rubygems

Version Path
nanoc-4.4.5 test/rule_dsl/test_rule.rb
nanoc-4.4.4 test/rule_dsl/test_rule.rb
nanoc-4.4.3 test/rule_dsl/test_rule.rb
nanoc-4.4.2 test/rule_dsl/test_rule.rb
nanoc-4.4.1 test/rule_dsl/test_rule.rb
nanoc-4.4.0 test/rule_dsl/test_rule.rb
nanoc-4.3.8 test/rule_dsl/test_rule.rb
nanoc-4.3.7 test/rule_dsl/test_rule.rb
nanoc-4.3.6 test/rule_dsl/test_rule.rb
nanoc-4.3.5 test/rule_dsl/test_rule.rb
nanoc-4.3.4 test/rule_dsl/test_rule.rb
nanoc-4.3.3 test/rule_dsl/test_rule.rb
nanoc-4.3.2 test/rule_dsl/test_rule.rb
nanoc-4.3.1 test/rule_dsl/test_rule.rb
nanoc-4.3.0 test/rule_dsl/test_rule.rb
nanoc-4.2.4 test/rule_dsl/test_rule.rb
nanoc-4.2.3 test/rule_dsl/test_rule.rb
nanoc-4.2.2 test/rule_dsl/test_rule.rb
nanoc-4.2.1 test/rule_dsl/test_rule.rb
nanoc-4.2.0 test/rule_dsl/test_rule.rb