shoulda_runner 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shoulda_runner/ast_builder.rb +2 -15
- data/lib/shoulda_runner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e7ecb2e4bf49a484c9cf9b8f7a50df3710ebd2d
|
4
|
+
data.tar.gz: e03a306cea3bb6a867dd1b4c294bb414466e352a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8df88b064f43b2af6dac7a552d63ac41e5a1d0628a9d8d6065f2a794ba0ec9e80346a1c03d228ecebc08237e330f629ac73a6b79cba62a3be6399998a8084993
|
7
|
+
data.tar.gz: 3b4dd38f7b06c47920b55c349df4812c0ebfd8a194feac4bf6665908f2d5a8d5af956bdc5f5a115d5f8e1ee42b413f6a82fcfa8ca6daf0d5f8a9daf70c89ef89
|
@@ -23,7 +23,7 @@ module ShouldaRunner
|
|
23
23
|
stack.push should_node(line, number)
|
24
24
|
elsif line =~ /^def\s/
|
25
25
|
stack.push disposable_node(line)
|
26
|
-
elsif line =~ /(do|do\s
|
26
|
+
elsif line =~ /(do|do\s\|.+\|)$/
|
27
27
|
stack.push disposable_node(line)
|
28
28
|
elsif line =~ /^end$/
|
29
29
|
node = stack.pop
|
@@ -39,19 +39,6 @@ module ShouldaRunner
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
43
|
-
unless stack.empty?
|
44
|
-
while !stack.empty?
|
45
|
-
node = stack.pop
|
46
|
-
unless stack.empty?
|
47
|
-
parent = stack.pop
|
48
|
-
parent << node
|
49
|
-
stack.push parent
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
@asts << node
|
54
|
-
end
|
55
42
|
end
|
56
43
|
|
57
44
|
private
|
@@ -87,7 +74,7 @@ module ShouldaRunner
|
|
87
74
|
end
|
88
75
|
|
89
76
|
def each_source_code_line
|
90
|
-
@source.each_line.map(&:chomp).map(&:
|
77
|
+
@source.each_line.map(&:chomp).map(&:strip).each.with_index do |line, index|
|
91
78
|
yield line, index + 1
|
92
79
|
end
|
93
80
|
end
|