test_parser 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/test_parser/test_information.rb +3 -1
- data/lib/test_parser/version.rb +1 -1
- metadata +1 -1
@@ -1,13 +1,15 @@
|
|
1
1
|
module TestParser
|
2
2
|
class TestInformation < Struct.new(:type, :identification, :file, :extras)
|
3
|
+
|
3
4
|
def snippet
|
4
5
|
source_code = SourceCode.for(file)
|
5
|
-
case
|
6
|
+
case type
|
6
7
|
when :rspec2
|
7
8
|
source_code.extract_code_from_line(extras[:line_number])
|
8
9
|
when :minitest
|
9
10
|
source_code.extract_method(extras[:method_name])
|
10
11
|
end
|
11
12
|
end
|
13
|
+
|
12
14
|
end
|
13
15
|
end
|
data/lib/test_parser/version.rb
CHANGED