Sha256: 5cd8d7c036d9b2b001d1958aa10cf86020cf2e395696df2ed57583ae1570cfbf

Contents?: true

Size: 499 Bytes

Versions: 18

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

18 entries across 18 versions & 1 rubygems

Version Path
nanoc-4.7.5 test/rule_dsl/test_rule.rb
nanoc-4.7.4 test/rule_dsl/test_rule.rb
nanoc-4.7.3 test/rule_dsl/test_rule.rb
nanoc-4.7.2 test/rule_dsl/test_rule.rb
nanoc-4.7.1 test/rule_dsl/test_rule.rb
nanoc-4.7.0 test/rule_dsl/test_rule.rb
nanoc-4.6.4 test/rule_dsl/test_rule.rb
nanoc-4.6.3 test/rule_dsl/test_rule.rb
nanoc-4.6.2 test/rule_dsl/test_rule.rb
nanoc-4.6.1 test/rule_dsl/test_rule.rb
nanoc-4.6.0 test/rule_dsl/test_rule.rb
nanoc-4.5.4 test/rule_dsl/test_rule.rb
nanoc-4.5.3 test/rule_dsl/test_rule.rb
nanoc-4.5.2 test/rule_dsl/test_rule.rb
nanoc-4.5.1 test/rule_dsl/test_rule.rb
nanoc-4.5.0 test/rule_dsl/test_rule.rb
nanoc-4.4.7 test/rule_dsl/test_rule.rb
nanoc-4.4.6 test/rule_dsl/test_rule.rb