Permalink
Browse files

Remove some commented-out cruft

  • Loading branch information...
glv committed Feb 22, 2010
1 parent 36b3cfc commit c102559e2495d74ed6e4af1907dc031227c4afc8
Showing with 5 additions and 15 deletions.
  1. +5 −15 lib/rspec/unit/test_case.rb
@@ -31,26 +31,11 @@ def inherited(klass)
install_setup_and_teardown(klass)
- # extra_metadata = {
- # :test_unit => true,
- # :caller => caller
- # }
- # extra_metadata[:file_path] = extra_metadata[:caller][0].split(":")[0].strip
- # extra_metadata[:line_number] = extra_metadata[:caller][0].split(":")[1].to_i
- #
- # klass_name = klass.name(false)
- # desc = (klass_name.nil? || klass_name.empty?) ? 'Anonymous TestCase' : "TestCase #{klass_name}"
- # klass.set_it_up(desc, extra_metadata)
name = test_case_name(klass)
_build(klass, caller, [name, {}])
klass.metadata[:example_group][:test_unit] = true
end
- def test_case_name(klass)
- class_name = klass.name(false)
- (class_name.nil? || class_name.empty?) ? 'Anonymous TestCase' : "TestCase #{class_name}"
- end
-
def test_case_info(options)
metadata[:example_group].update(options)
end
@@ -82,6 +67,11 @@ def to_s
private
+ def test_case_name(klass)
+ class_name = klass.name(false)
+ (class_name.nil? || class_name.empty?) ? 'Anonymous TestCase' : "TestCase #{class_name}"
+ end
+
def caller_lines
@_caller_lines ||= {}
end

0 comments on commit c102559

Please sign in to comment.