<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Testing exceptions with RSpec</title><link>http://msmvps.com/blogs/nuoyan/archive/2009/04/20/testing-exceptions-with-rspec.aspx</link><description>I&amp;#39;m new to ruby and rspec. I wrote a ruby function and wanted to check whether it throws an exception or not in a certain situation with rspec, but I realized should_raise function no longer worked in the rspec version I was using (1.2.2). I tried</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Testing exceptions with RSpec</title><link>http://msmvps.com/blogs/nuoyan/archive/2009/04/20/testing-exceptions-with-rspec.aspx#1734979</link><pubDate>Sun, 25 Oct 2009 07:23:28 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1734979</guid><dc:creator>Nuo Yan</dc:creator><description>&lt;p&gt;Fixed. Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1734979" width="1" height="1"&gt;</description></item><item><title>re: Testing exceptions with RSpec</title><link>http://msmvps.com/blogs/nuoyan/archive/2009/04/20/testing-exceptions-with-rspec.aspx#1734954</link><pubDate>Sun, 25 Oct 2009 03:04:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1734954</guid><dc:creator>qichunren</dc:creator><description>&lt;p&gt;it &amp;quot;description&amp;quot; do&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;labmda{ObjectName.new(&amp;quot;parameterName&amp;quot;)}.should raise_error&lt;/p&gt;
&lt;p&gt;end&lt;/p&gt;
&lt;p&gt;not labmda,it is lambda&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1734954" width="1" height="1"&gt;</description></item></channel></rss>