Sha256: e242a9c0c1f44e06582c116281cba854ffbbb83cbc4930fe7c2ad4665e833e05

Contents?: true

Size: 447 Bytes

Versions: 3

Compression:

Stored size: 447 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

module FooBar
  class SampleRule < Splam::Rule
  end

  class NamedRule < Splam::Rule
    self.splam_key = :special_name
  end
end

class SplamRuleTest < Test::Unit::TestCase
  def test_implicit_splam_key
    assert_equal FooBar::SampleRule, Splam::Rule.rules[:sample_rule]
  end

  def test_explicit_splam_key
    assert_equal FooBar::NamedRule, Splam::Rule.rules[:special_name]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
splam-0.1.1 test/splam_rule_test.rb
splam-0.2.0 test/splam_rule_test.rb
splam-0.1.0 test/splam_rule_test.rb