riot 0.11.2 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,3 +4,4 @@ pkg
4
4
  doc
5
5
  .yardoc
6
6
  *.tmproj
7
+ _site
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ *0.11.3*
2
+
3
+ * Modified `matches` assertion macro to treat actual as a string before executing regular expression comparison. [jaknowlden]
4
+
5
+ asserts("a number") { 42 }.matches(/\d+/)
6
+ # same as
7
+ asserts("a number as string") { "42" }.matches(/\d+/)
8
+
1
9
  *0.11.2*
2
10
 
3
11
  * [ISSUE] Options were not nesting. Now fixed. [jaknowlden]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.2
1
+ 0.11.3
@@ -7,7 +7,7 @@ module Riot
7
7
 
8
8
  def evaluate(actual, expected)
9
9
  expected = %r[#{Regexp.escape(expected)}] if expected.kind_of?(String)
10
- if actual =~ expected
10
+ if actual.to_s =~ expected
11
11
  pass(new_message.matches(expected))
12
12
  else
13
13
  fail(expected_message(expected).to_match(actual))
data/riot.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{riot}
8
- s.version = "0.11.2"
8
+ s.version = "0.11.3"
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{2010-06-14}
12
+ s.date = %q{2010-07-12}
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 = [
@@ -9,4 +9,16 @@ context "A matching assertion macro" do
9
9
  topic.matches(/abcd/)
10
10
  end
11
11
 
12
+ context "with integer based topic" do
13
+ setup { Riot::Assertion.new("foo") { 42 } }
14
+
15
+ assertion_test_passes("actual value converted to string", %Q{matches /^42$/}) do
16
+ topic.matches(/^42$/)
17
+ end
18
+
19
+ assertion_test_fails("actual value converted to string", %Q{expected /^52$/ to match 42}) do
20
+ topic.matches(/^52$/)
21
+ end
22
+ end
23
+
12
24
  end # A matching assertion macro
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 11
8
- - 2
9
- version: 0.11.2
8
+ - 3
9
+ version: 0.11.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin 'Gus' Knowlden
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-14 00:00:00 -05:00
17
+ date: 2010-07-12 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency