aboutsummaryrefslogtreecommitdiffstats
path: root/lib/minitest/spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/minitest/spec.rb')
-rw-r--r--lib/minitest/spec.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/minitest/spec.rb b/lib/minitest/spec.rb
index c0c0ae2f02..02c57ec7ef 100644
--- a/lib/minitest/spec.rb
+++ b/lib/minitest/spec.rb
@@ -181,12 +181,6 @@ class MiniTest::Spec < MiniTest::Unit::TestCase
add_teardown_hook {|tc| tc.instance_eval(&block) }
end
- NAME_RE = if RUBY_VERSION >= "1.9"
- Regexp.new("[^[[:word:]]]+")
- else
- /\W+/u
- end
-
##
# Define an expectation with name +desc+. Name gets morphed to a
# proper test method name. For some freakish reason, people who
@@ -204,7 +198,7 @@ class MiniTest::Spec < MiniTest::Unit::TestCase
@specs ||= 0
@specs += 1
- name = "test_%04d_%s" % [ @specs, desc.gsub(NAME_RE, '_').downcase ]
+ name = "test_%04d_%s" % [ @specs, desc ]
define_method name, &block