matest 1.5.6 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d849202bcc1dfff8456c84c1f173a23d29cc6099
4
- data.tar.gz: 8a84d5dd67cc90727407c12c57503a72e51e0f9a
3
+ metadata.gz: cdd94fa2c67c5879e1bce40cc7733454873d8946
4
+ data.tar.gz: 1ee0b99d5072085543f595220bb58bfdfe21d088
5
5
  SHA512:
6
- metadata.gz: 12ab5976effbf9dce99fe3a4ae2fc750437406b978028713fb189e24cc8eb6f54b5a8f27e8e0890f02e0d7a882e45dfd5a20d3505582e1be31ac9c29aa38d106
7
- data.tar.gz: 6489e4bf9413e944104796899eb098a6cec266acd50dd5aecea59a174cc2ee04353eb16e402a0d3818298b3b6a08b387bd1948c008efd82cc3d3826d6a08b36a
6
+ metadata.gz: 44586966ff804bc0fab6a6001edf486dce5f9603669900a9909614b3808a2fa65593dcbdb5ac1b925740fd0258b181dbf94084180963f73922b3a7b749973c13
7
+ data.tar.gz: 86104422331ad5ddbb31c9b37e052ba6e2a93690b096bfc5e85e55b3c72b7804a74e5d55fb538a11f09033aaa1fd122d992d98d0e9caef05a7199fedcfb98eb2
@@ -39,7 +39,13 @@ class ExampleBlock
39
39
  valid_lines << lines[current_line]
40
40
  end
41
41
 
42
- valid_lines[1..-2].join
42
+ code = valid_lines[1..-2].join
43
+
44
+ return code unless code == ""
45
+
46
+ valid_lines = [lines[lineno-1]].join
47
+ code = Ripper::SexpBuilder.new(valid_lines).parse.last.last.last.last
48
+ Sorcerer.source(code)
43
49
  end
44
50
 
45
51
  def lines
@@ -105,7 +105,7 @@ module Matest
105
105
  def expression(str)
106
106
  yellow(str)
107
107
  end
108
-
108
+
109
109
  def value(str)
110
110
  blue(str)
111
111
  end
@@ -117,7 +117,7 @@ module Matest
117
117
  def error(str)
118
118
  red(str)
119
119
  end
120
-
120
+
121
121
  def colors
122
122
  {
123
123
  Matest::SpecPassed => :green,
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.5.6"
2
+ VERSION = "1.6.0"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- scope do
3
+ xscope do
4
4
  let(:three) { 3 }
5
5
  xspec "variables and lets" do
6
6
  one = 2
@@ -28,3 +28,13 @@ scope do
28
28
  @res = @one_plus_two_plus_three.to_i + @res.to_i
29
29
  end
30
30
  end
31
+ scope do
32
+ let(:parser) { OpenStruct.new(args: []) }
33
+ spec("AAAAAAAAAA") { parser.args == %w[first second] }
34
+ spec("BBBBBBBBBB") {
35
+ a = 5
36
+ parser.args == %w[first second]
37
+ }
38
+ spec("CCCCCCCCCC") { parser.args == %w[first second] }
39
+ spec { parser.args == %w[first second] }
40
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-16 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 2.4.5
131
+ rubygems_version: 2.4.6
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Tests gasoleros (cheap tests).