superbara 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/examples/sites/vr.fi/helsinki-tampere/main.rb +2 -2
- data/lib/superbara/context.rb +9 -1
- data/lib/superbara/dsl.rb +9 -0
- data/lib/superbara/version.rb +1 -1
- data/tests/envs/on_error/main.rb +15 -3
- data/tests/run/has_instance_variables.rb +7 -0
- data/tests/run/has_no_instance_variables.rb +7 -0
- data/tests/run/main.rb +2 -2
- metadata +3 -3
- data/tests/run/has_locals.rb +0 -7
- data/tests/run/has_no_locals.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f4295350bebd45aadb239fbcc40fc37ff90d5ff68a3034fedfc00aafedc5126
|
4
|
+
data.tar.gz: 74cb152022563849a2dce5d9944ecd3b5b81c8631133d1091522e5391d6a8132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44befc00835d55eddedc686dda81c74b7c4a4e52a16446a124e33c4e9702c8fa2c041219b18f799876bcafcbdb256cb0a4b2f4a93629b98d4a351e07bebbb64
|
7
|
+
data.tar.gz: 42c74aa672ef8c84db20aedd5df80e15aaf2b1d94b79f326dc7252cc8ca276611c44323ca92704526b4da8d8855a484d48bd98183aac56f3803e7949bb09855c
|
data/Gemfile.lock
CHANGED
data/lib/superbara/context.rb
CHANGED
@@ -21,6 +21,14 @@ sleep 0.0001
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
params.each_pair do |k,v|
|
25
|
+
eval = "@#{k} = "
|
26
|
+
eval << "'" if v.class == String
|
27
|
+
eval << v
|
28
|
+
eval << "'" if v.class == String
|
29
|
+
Superbara.main.instance_eval "@#{k} = #{eval}"
|
30
|
+
end
|
31
|
+
|
24
32
|
begin
|
25
33
|
load path, true
|
26
34
|
rescue Superbara::Errors::NotDesiredTagError
|
@@ -28,7 +36,7 @@ sleep 0.0001
|
|
28
36
|
end
|
29
37
|
|
30
38
|
params.each_pair do |k,v|
|
31
|
-
Superbara.main.instance_eval "
|
39
|
+
Superbara.main.instance_eval "remove_instance_variable '@#{k}'"
|
32
40
|
end
|
33
41
|
end
|
34
42
|
|
data/lib/superbara/dsl.rb
CHANGED
@@ -117,6 +117,7 @@ return Array.from(
|
|
117
117
|
Superbara.project_path = File.dirname(better_what)
|
118
118
|
end
|
119
119
|
|
120
|
+
error_happened = false
|
120
121
|
begin
|
121
122
|
Superbara.current_context.__superbara_load(better_what, params)
|
122
123
|
rescue Exception => ex
|
@@ -126,11 +127,19 @@ return Array.from(
|
|
126
127
|
#TODO: output to support "colored tags" and nesting
|
127
128
|
Superbara.output colored_output
|
128
129
|
Superbara.errored_runs << what
|
130
|
+
error_happened = true
|
129
131
|
else
|
130
132
|
raise ex
|
131
133
|
end
|
132
134
|
end
|
135
|
+
|
133
136
|
Superbara.project_path = old_project_path
|
137
|
+
|
138
|
+
if error_happened
|
139
|
+
false
|
140
|
+
else
|
141
|
+
true
|
142
|
+
end
|
134
143
|
end
|
135
144
|
|
136
145
|
def visit(visit_uri_or_domain_or_path)
|
data/lib/superbara/version.rb
CHANGED
data/tests/envs/on_error/main.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
-
run "first_failing"
|
2
|
-
run "second_ok"
|
3
|
-
run "third_failing"
|
1
|
+
first = run "first_failing"
|
2
|
+
second = run "second_ok"
|
3
|
+
third = run "third_failing"
|
4
|
+
|
5
|
+
assert do
|
6
|
+
first == false
|
7
|
+
end
|
8
|
+
|
9
|
+
assert do
|
10
|
+
second == true
|
11
|
+
end
|
12
|
+
|
13
|
+
assert do
|
14
|
+
third == false
|
15
|
+
end
|
data/tests/run/main.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
run "
|
2
|
-
run "
|
1
|
+
run "has_instance_variables", first: "hello", second: "world"
|
2
|
+
run "has_no_instance_variables"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superbara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matti Paksula
|
@@ -354,8 +354,8 @@ files:
|
|
354
354
|
- tests/features/type.rb
|
355
355
|
- tests/features/wait.rb
|
356
356
|
- tests/minimal/main.rb
|
357
|
-
- tests/run/
|
358
|
-
- tests/run/
|
357
|
+
- tests/run/has_instance_variables.rb
|
358
|
+
- tests/run/has_no_instance_variables.rb
|
359
359
|
- tests/run/main.rb
|
360
360
|
- vendor/chromedriver/linux64/.gitkeep
|
361
361
|
- vendor/chromedriver/linux64/chromedriver
|
data/tests/run/has_locals.rb
DELETED