matest 1.7.0 → 1.7.1

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: 5c7b101e40bda15067b116796ccb0060a9f6b607
4
- data.tar.gz: d85e60ef5c8febc5576dd564b3573a3a5b1aaf06
3
+ metadata.gz: ce89b8aefb2465f4ce1ba05ccf1631753f1eb652
4
+ data.tar.gz: ac6b4b4dcc5b6f2da444e9f38924cc6b2cb6c65e
5
5
  SHA512:
6
- metadata.gz: 4126278afdc314d82a5c72664e55e7b184da2287a37103f49cf0ef7bb701e246f1702568b3dd9ce1c89c74c9d11ae73a1f13f91b81f4738ef4e9d8061b3cec41
7
- data.tar.gz: ec48e865d456f5b58c1bf0cd5000b8a469bccdfa4e81c54c8a86edb4b736b0d8f8699fb0350b90092c5e2182ab3ff036cf551249d3dce37acd1653e1d28dfb82
6
+ metadata.gz: 580dbcc929e9d39d1a8aa04cc63cdfd827fc6ec624385bdda9a3db5e0035a16c674341e8ba244b42355989527f888a60d8b1e4a5ab80e019844748d1913fb9e1
7
+ data.tar.gz: 572fc3a4fede3ae6d501df17cc37e3b5e5d50ce24860ecce6465e87cabca892423cb923f22dd49404c723777e582ad383a701911e06a8b90d07276b38fbd554d
@@ -82,10 +82,12 @@ module Matest
82
82
  end
83
83
 
84
84
  def print_subexpression(subexpression, status)
85
- just_before_assertion = status.example.just_before_assertion.code
86
- code = just_before_assertion + subexpression
87
-
88
- result = Evaluator.new(just_before_assertion, proc{}).eval_string(code)
85
+ just_before_assertion = status.example.just_before_assertion
86
+ code = just_before_assertion.code + subexpression
87
+
88
+ result = Evaluator.new(just_before_assertion, just_before_assertion.before_assertion_block).eval_string(code)
89
+
90
+ #result = Evaluator.new(just_before_assertion, proc{}).eval_string(code)
89
91
  if result.class != Matest::EvalErr
90
92
  explanation = []
91
93
  explanation << expression(" #{subexpression}")
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.7.0"
2
+ VERSION = "1.7.1"
3
3
  end
@@ -1,17 +1,24 @@
1
1
  require "spec_helper"
2
2
 
3
3
  scope do
4
- spec "it explains local variables on failure" do
4
+ xspec "it explains local variables on failure" do
5
5
  a = 5
6
6
  b = 6
7
7
 
8
8
  a + b == 10
9
9
  end
10
10
 
11
- spec "it explains local variables on non natural" do
11
+ xspec "it explains local variables on non natural" do
12
12
  a = 5
13
13
  b = 6
14
14
 
15
15
  a + rand(b)
16
16
  end
17
+
18
+ let(:b) { 1 }
19
+ xspec "still works with lets" do
20
+ a = 1
21
+
22
+ a + b == 3
23
+ end
17
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti