summaryrefslogtreecommitdiff
path: root/test/rss/rss-assertions.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 06:53:41 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 06:53:41 +0000
commitb684f87574166a42d3305c005896bf2aa7cd37b3 (patch)
tree3c0083d0e120e624822a05df86762d20e1ac2dbc /test/rss/rss-assertions.rb
parent49d454ea2e2dc1d447b2dc290b6ea361ad18f979 (diff)
* 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
Diffstat (limited to 'test/rss/rss-assertions.rb')
-rw-r--r--test/rss/rss-assertions.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb
index a51fc1fd60..569e9621d2 100644
--- a/test/rss/rss-assertions.rb
+++ b/test/rss/rss-assertions.rb
@@ -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)