riot 0.9.11 → 0.9.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.11
1
+ 0.9.12
@@ -34,7 +34,7 @@ module Riot
34
34
  # asserts("test") { raise My::Exception, "Foo Bar" }.raises(My::Exception, /Bar/)
35
35
  # asserts("test") { raise My::Exception, ["a", "b"] }.raises(My::Exception, "ab")
36
36
  def raises(expected, expected_message=nil)
37
- actual_error = raised.original_exception
37
+ actual_error = raised && raised.original_exception
38
38
  @raised = nil
39
39
  if actual_error.nil?
40
40
  return fail("should have raised #{expected}, but raised nothing")
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{riot}
8
- s.version = "0.9.11"
8
+ s.version = "0.9.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin 'Gus' Knowlden"]
12
- s.date = %q{2009-10-19}
12
+ s.date = %q{2009-10-22}
13
13
  s.description = %q{An extremely fast, expressive, and context-driven unit-testing framework. A replacement for all other testing frameworks. Protest the slow test.}
14
14
  s.email = %q{gus@gusg.us}
15
15
  s.extra_rdoc_files = [
@@ -7,6 +7,12 @@ context "raises assertion:" do
7
7
 
8
8
  should("raise an Exception") { raise Exception }.raises(Exception)
9
9
 
10
+ should "fail if nothing was raised" do
11
+ assertion = Riot::Assertion.new("foo", topic) { "barf" }
12
+ assertion.raises(Exception)
13
+ assertion.result.message
14
+ end.matches(/should have raised Exception, but raised nothing/)
15
+
10
16
  should "fail if Exception classes do not match" do
11
17
  Riot::Assertion.new("foo", topic) { raise MyException }.raises(Exception)
12
18
  end.kind_of(Riot::Failure)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.11
4
+ version: 0.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin 'Gus' Knowlden
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-19 00:00:00 -05:00
12
+ date: 2009-10-22 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15