rubyslim-unofficial 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.
- data/README.md +2 -2
- data/lib/rubyslim/list_executor.rb +10 -1
- data/lib/rubyslim/statement.rb +6 -1
- data/rubyslim-unofficial.gemspec +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -116,13 +116,13 @@ Consider, for example, this fixtures class:
|
|
116
116
|
|
117
117
|
This corresponds to the following tables.
|
118
118
|
|
119
|
-
|script|test slim with arguments|!{name:bob addr:here}|
|
119
|
+
|script|test slim with arguments|!{name:bob, addr:here}|
|
120
120
|
|check|name|bob|
|
121
121
|
|check|addr|here|
|
122
122
|
|
123
123
|
|script|test slim with arguments|gunk|
|
124
124
|
|check|arg|gunk|
|
125
|
-
|set arg|!{name:bob addr:here}|
|
125
|
+
|set arg|!{name:bob, addr:here}|
|
126
126
|
|check|name|bob|
|
127
127
|
|check|addr|here|
|
128
128
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "rubyslim/statement"
|
2
2
|
require "rubyslim/statement_executor"
|
3
|
+
require "rubyslim/slim_error"
|
3
4
|
|
4
5
|
class ListExecutor
|
5
6
|
def initialize()
|
@@ -7,6 +8,14 @@ class ListExecutor
|
|
7
8
|
end
|
8
9
|
|
9
10
|
def execute(instructions)
|
10
|
-
|
11
|
+
results = []
|
12
|
+
instructions.each do |instruction|
|
13
|
+
result = Statement.execute(instruction, @executor)
|
14
|
+
results << result
|
15
|
+
if result[1] =~ /^STOP/
|
16
|
+
return results
|
17
|
+
end
|
18
|
+
end
|
19
|
+
return results
|
11
20
|
end
|
12
21
|
end
|
data/lib/rubyslim/statement.rb
CHANGED
@@ -33,7 +33,12 @@ class Statement
|
|
33
33
|
rescue SlimError => e
|
34
34
|
[id, EXCEPTION_TAG + e.message]
|
35
35
|
rescue Exception => e
|
36
|
-
|
36
|
+
message = EXCEPTION_TAG + e.message + "\n" + e.backtrace.join("\n")
|
37
|
+
if e.class.to_s =~ /StopTest/
|
38
|
+
[id, "STOP" + message]
|
39
|
+
else
|
40
|
+
[id, message]
|
41
|
+
end
|
37
42
|
end
|
38
43
|
|
39
44
|
end
|
data/rubyslim-unofficial.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyslim-unofficial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robert C. Martin
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-09-22 00:00:00 -06:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|