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 +4 -4
- data/lib/matest/example_block.rb +7 -1
- data/lib/matest/spec_printer.rb +2 -2
- data/lib/matest/version.rb +1 -1
- data/spec/matest_specs/printing_assertion_spec.rb +11 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdd94fa2c67c5879e1bce40cc7733454873d8946
|
4
|
+
data.tar.gz: 1ee0b99d5072085543f595220bb58bfdfe21d088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44586966ff804bc0fab6a6001edf486dce5f9603669900a9909614b3808a2fa65593dcbdb5ac1b925740fd0258b181dbf94084180963f73922b3a7b749973c13
|
7
|
+
data.tar.gz: 86104422331ad5ddbb31c9b37e052ba6e2a93690b096bfc5e85e55b3c72b7804a74e5d55fb538a11f09033aaa1fd122d992d98d0e9caef05a7199fedcfb98eb2
|
data/lib/matest/example_block.rb
CHANGED
@@ -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
|
data/lib/matest/spec_printer.rb
CHANGED
@@ -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,
|
data/lib/matest/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
|
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.
|
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
|
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.
|
131
|
+
rubygems_version: 2.4.6
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Tests gasoleros (cheap tests).
|