Permalink
Browse files

fix scale of the called_from

  • Loading branch information...
1 parent 9ee313a commit 3987b4c3d29e586346c2a6e27c9839e58c63beb6 @kachick committed Aug 26, 2012
View
@@ -1,5 +1,5 @@
-0.0.2 2012-08-27
-================
+0.0.2.1 2012-08-27
+==================
* Fix when declared same test-case name
View
@@ -14,6 +14,6 @@ lib/test/declare/assertions.rb
lib/test/declare/singleton_class.rb
lib/test/declare/core_kernel.rb
examples/test_helper.rb
-examples/successfull.rb
-examples/fail.rb
-examples/mixed.rb
+examples/test_successfull.rb
+examples/test_failure.rb
+examples/test_mixed.rb
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -107,8 +107,7 @@ def summary_for(obj)
end
def called_from
- dirname = File.dirname __FILE__
- caller.reject{|s|s.include?(dirname)}[-2]
+ caller.find{|s|%r![/\\]test_! =~ s}
end
def format_testname(body)
@@ -1,5 +1,5 @@
module Test; module Declare
- VERSION = '0.0.2'.freeze
+ VERSION = '0.0.2.1'.freeze
end; end

0 comments on commit 3987b4c

Please sign in to comment.