test_parser 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,13 @@
1
1
  module TestParser
2
- TestInformation = Struct.new(:type, :identification, :file, :extras)
2
+ class TestInformation < Struct.new(:type, :identification, :file, :extras)
3
+ def snippet
4
+ source_code = SourceCode.for(file)
5
+ case test.type
6
+ when :rspec2
7
+ source_code.extract_code_from_line(extras[:line_number])
8
+ when :minitest
9
+ source_code.extract_method(extras[:method_name])
10
+ end
11
+ end
12
+ end
3
13
  end
@@ -1,3 +1,3 @@
1
1
  module TestParser
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: test_parser
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Juan Manuel Barreneche