Sha256: 35e75e0110774881cb979e71b23808d5e2cac84b58a66951d44ec1701735af8c

Contents?: true

Size: 356 Bytes

Versions: 1

Compression:

Stored size: 356 Bytes

Contents

module M
  class TestMethod < Struct.new(:name, :start_line, :end_line)
    def self.create(suite_class, test_method)
      method     = suite_class.instance_method(test_method)
      start_line = method.source_location.last
      end_line   = method.source.split("\n").size + start_line - 1

      new(test_method, start_line, end_line)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
m-0.0.1 lib/m/test_method.rb