mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss/rss.rb (RSS::NotSetError): added.
* lib/rss/maker/{1.0,0.9,2.0}.rb: changed RSS Maker to raise RSS::NotSetError if required values of maker.channel are not set. * test/rss/test_maker_{1.0,0.9,2.0}.rb: changed tests to check RSS Maker raises or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
49d454ea2e
commit
b684f87574
10 changed files with 256 additions and 194 deletions
|
@ -95,6 +95,18 @@ module RSS
|
|||
end
|
||||
end
|
||||
|
||||
def assert_not_set_error(name, variables)
|
||||
_wrap_assertion do
|
||||
begin
|
||||
yield
|
||||
flunk("Not raise NotSetError")
|
||||
rescue ::RSS::NotSetError => e
|
||||
assert_equal(name, e.name)
|
||||
assert_equal(variables.sort, e.variables.sort)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def assert_xml_declaration(version, encoding, standalone, rss)
|
||||
_wrap_assertion do
|
||||
assert_equal(version, rss.version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue