Skip to content

Commit

Permalink
Merge pull request #50 from olivierlacan/patch-1
Browse files Browse the repository at this point in the history
Move require outside of class method
  • Loading branch information
zamith committed Nov 6, 2015
2 parents f419869 + 3f49381 commit cb52f0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/m/test_method.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "method_source"

module M
### Simple data structure for what a test method contains.
#
Expand All @@ -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
Expand Down

0 comments on commit cb52f0b

Please sign in to comment.