diff --git a/lib/m/test_method.rb b/lib/m/test_method.rb index de09d64..4ef3329 100644 --- a/lib/m/test_method.rb +++ b/lib/m/test_method.rb @@ -1,3 +1,5 @@ +require "method_source" + module M ### Simple data structure for what a test method contains. # @@ -22,7 +24,7 @@ def self.create(suite_class, test_method) # # The end line should be the number of line breaks in the method source, # added to the starting line and subtracted by one. - require "method_source" + end_line = method.source.split("\n").size + start_line - 1 # Shove the given attributes into a new databag