Sha256: 2ac1a19adb3ea70eb92d38acfea4621707aa6c0c98d6cadea2ddc68ef8d5fdc3

Contents?: true

Size: 530 Bytes

Versions: 17

Compression:

Stored size: 530 Bytes

Contents

# frozen_string_literal: true

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

17 entries across 17 versions & 1 rubygems

Version Path
nanoc-4.8.11 test/rule_dsl/test_rule.rb
nanoc-4.8.10 test/rule_dsl/test_rule.rb
nanoc-4.8.9 test/rule_dsl/test_rule.rb
nanoc-4.8.8 test/rule_dsl/test_rule.rb
nanoc-4.8.7 test/rule_dsl/test_rule.rb
nanoc-4.8.6 test/rule_dsl/test_rule.rb
nanoc-4.8.5 test/rule_dsl/test_rule.rb
nanoc-4.8.4 test/rule_dsl/test_rule.rb
nanoc-4.8.3 test/rule_dsl/test_rule.rb
nanoc-4.8.2 test/rule_dsl/test_rule.rb
nanoc-4.8.1 test/rule_dsl/test_rule.rb
nanoc-4.8.0 test/rule_dsl/test_rule.rb
nanoc-4.7.14 test/rule_dsl/test_rule.rb
nanoc-4.7.13 test/rule_dsl/test_rule.rb
nanoc-4.7.12 test/rule_dsl/test_rule.rb
nanoc-4.7.11 test/rule_dsl/test_rule.rb
nanoc-4.7.10 test/rule_dsl/test_rule.rb