Sha256: 17b4b8696cb73c0f2a10337ba545284c20a7ea394345216758290140b8d9bd63
Contents?: true
Size: 852 Bytes
Versions: 2
Compression:
Stored size: 852 Bytes
Contents
require File.join(File.dirname(__FILE__), 'test_helper') #test filter module ConsoleUpdate class Filter module Test end end end class ConsoleUpdate::FilterTest < Test::Unit::TestCase test "incorrect filter name raises FilterNotFoundError" do assert_raises(ConsoleUpdate::Filter::FilterNotFoundError) { ConsoleUpdate::Filter.new(:blah) } end test "filter without proper methods raises AbstractMethodError" do assert_raises(ConsoleUpdate::Filter::AbstractMethodError) { ConsoleUpdate::Filter.new(:test).string_to_hashes('blah') } end test "extends filter for a non-lowercase filter name correctly" do filter_meta_class = ConsoleUpdate::Filter.new("Test").instance_eval("class<<self; self;end") filter_meta_class.ancestors.include?(ConsoleUpdate::Filter::Test).should be(true) end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
cldwalker-console_update-0.1.1 | test/filter_test.rb |
console_update-0.1.2 | test/filter_test.rb |