test/test_contentprocessor.rb in gettalong-webgen-0.5.9.20090620 vs test/test_contentprocessor.rb in gettalong-webgen-0.5.9.20090626
- old
+ new
@@ -8,11 +8,11 @@
include Test::WebsiteHelper
def setup
super
- @website.config.data['contentprocessor.map'] = {'test' => Hash}
+ @website.config.data['contentprocessor.map'] = {'test' => Hash, 'binary' => [Hash, :binary]}
end
def test_access_hash
ah = Webgen::ContentProcessor::AccessHash.new
assert(ah.has_key?('test'))
@@ -20,14 +20,20 @@
assert_kind_of(Hash, ah['test'])
assert_nil(ah['other'])
end
def test_list
- assert_equal(['test'], Webgen::ContentProcessor.list)
+ assert_equal(['binary', 'test'], Webgen::ContentProcessor.list.sort)
end
def test_for_name
assert_kind_of(Hash, Webgen::ContentProcessor.for_name('test'))
+ assert_kind_of(Hash, Webgen::ContentProcessor.for_name('binary'))
assert_nil(Webgen::ContentProcessor.for_name('other'))
+ end
+
+ def test_is_binary
+ assert(!Webgen::ContentProcessor.is_binary?('test'))
+ assert(Webgen::ContentProcessor.is_binary?('binary'))
end
end