Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

colorize output and reveal tests that never ran

  • Loading branch information...
commit 4b0143f0a3b10060d5f52346954219bba3375039 1 parent d765772
@grosser grosser authored
Showing with 5 additions and 4 deletions.
  1. +1 −0  Gemfile
  2. +4 −4 test/test_idres.rb
View
1  Gemfile
@@ -4,3 +4,4 @@ source 'https://rubygems.org'
gemspec
gem 'rake'
+gem 'test-unit', '>= 2.5.2'
View
8 test/test_idres.rb
@@ -63,7 +63,7 @@ def mkMsg(ns, fields, signed_fields)
[["openid1", OPENID1_NS, OPENID1_FIELDS],
["openid1", OPENID11_NS, OPENID1_FIELDS],
["openid2", OPENID2_NS, OPENID2_FIELDS],
- ].each do |ver, ns, all_fields|
+ ].each_with_index do |(ver, ns, all_fields), i|
all_fields.each do |field|
test = lambda do
fields = all_fields.dup
@@ -74,7 +74,7 @@ def mkMsg(ns, fields, signed_fields)
idres.send(:check_for_fields)
}
end
- define_method("test_#{ver}_check_missing_#{field}", test)
+ define_method("test_#{i}_#{ver}_check_missing_#{field}", test)
end
end
end
@@ -84,7 +84,7 @@ def mkMsg(ns, fields, signed_fields)
[["openid1", OPENID1_NS, OPENID1_FIELDS, OPENID1_SIGNED],
["openid1", OPENID11_NS, OPENID1_FIELDS, OPENID1_SIGNED],
["openid2", OPENID2_NS, OPENID2_FIELDS, OPENID2_SIGNED],
- ].each do |ver, ns, all_fields, signed_fields|
+ ].each_with_index do |(ver, ns, all_fields, signed_fields), i|
signed_fields.each do |signed_field|
test = lambda do
fields = signed_fields.dup
@@ -97,7 +97,7 @@ def mkMsg(ns, fields, signed_fields)
idres.send(:check_for_fields)
}
end
- define_method("test_#{ver}_check_missing_signed_#{signed_field}", test)
+ define_method("test_#{i}_#{ver}_check_missing_signed_#{signed_field}", test)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.