seeing_is_believing 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/errors.feature +36 -6
- data/features/regression.feature +0 -1
- data/lib/seeing_is_believing.rb +1 -1
- data/lib/seeing_is_believing/version.rb +1 -1
- metadata +1 -2
- data/Gemfile.lock +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c10c0902071eb7d3040e445ffe14eb65b4add43d
|
4
|
+
data.tar.gz: db2421790aa48eb53f3f4e79168392835e1a52c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fe36a0cfefd4b0c7f378094e9ffc8f3f5324a1ab9c370c47beee66abf45811e2b6af9a919c9d84abb3470e6629cfb866372745ff8b70cbeb1aacdddaac0fae3
|
7
|
+
data.tar.gz: 36ff482a6a34c232276633d8193665f20ec3fdbe29310d7d6cee9a5195c4e08781d450e4e79bf4575daa6e41d88514aa823130ceb4ed2482801b2dd7daea285e
|
data/features/errors.feature
CHANGED
@@ -3,6 +3,9 @@ Feature: Running the binary unsuccessfully
|
|
3
3
|
Sometimes I mess up and use the program in a way that doesn't work.
|
4
4
|
I'd like it to be helpful in these situations so I can fix my use.
|
5
5
|
|
6
|
+
# show that it displalys next to the first place in the file
|
7
|
+
# and should maybe print the stacktrace at the bottom
|
8
|
+
@wip
|
6
9
|
Scenario: Raising exceptions
|
7
10
|
Given the file "raises_exception.rb":
|
8
11
|
"""
|
@@ -10,18 +13,30 @@ Feature: Running the binary unsuccessfully
|
|
10
13
|
"""
|
11
14
|
And the file "requires_exception_raising_code.rb":
|
12
15
|
"""
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
+
def first_defined
|
17
|
+
second_defined
|
18
|
+
end
|
19
|
+
|
20
|
+
def second_defined
|
21
|
+
require_relative 'raises_exception'
|
22
|
+
end
|
23
|
+
|
24
|
+
first_defined
|
16
25
|
"""
|
17
26
|
When I run "seeing_is_believing requires_exception_raising_code.rb"
|
18
27
|
Then stderr is empty
|
19
28
|
And the exit status is 1
|
20
29
|
And stdout is:
|
21
30
|
"""
|
22
|
-
|
23
|
-
|
24
|
-
|
31
|
+
def first_defined
|
32
|
+
second_defined
|
33
|
+
end # => nil
|
34
|
+
|
35
|
+
def second_defined
|
36
|
+
require_relative 'raises_exception' # ~> RuntimeError: ZOMG!
|
37
|
+
end # => nil
|
38
|
+
|
39
|
+
first_defined
|
25
40
|
"""
|
26
41
|
|
27
42
|
Scenario: Syntactically invalid file
|
@@ -53,3 +68,18 @@ Feature: Running the binary unsuccessfully
|
|
53
68
|
And the exit status is 1
|
54
69
|
And stdout is empty
|
55
70
|
|
71
|
+
Scenario: Stack overflow
|
72
|
+
Given the file "stack_overflow.rb":
|
73
|
+
"""
|
74
|
+
def m() m end
|
75
|
+
m
|
76
|
+
"""
|
77
|
+
When I run "seeing_is_believing stack_overflow.rb"
|
78
|
+
Then stderr is empty
|
79
|
+
And the exit status is 1
|
80
|
+
And stdout is:
|
81
|
+
"""
|
82
|
+
def m() m end # ~> SystemStackError: stack level too deep
|
83
|
+
m
|
84
|
+
"""
|
85
|
+
|
data/features/regression.feature
CHANGED
data/lib/seeing_is_believing.rb
CHANGED
@@ -106,7 +106,7 @@ class SeeingIsBelieving
|
|
106
106
|
"begin;"\
|
107
107
|
"#{code}\n"\
|
108
108
|
"rescue Exception;"\
|
109
|
-
"line_number = $!.backtrace.grep(/\#{__FILE__}/).first[/:\\d
|
109
|
+
"line_number = $!.backtrace.grep(/\#{__FILE__}/).first[/:\\d+/][1..-1].to_i;"\
|
110
110
|
"$seeing_is_believing_current_result.record_exception line_number, $!;"\
|
111
111
|
"end"
|
112
112
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seeing_is_believing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Cheek
|
@@ -79,7 +79,6 @@ files:
|
|
79
79
|
- .gitignore
|
80
80
|
- .travis.yml
|
81
81
|
- Gemfile
|
82
|
-
- Gemfile.lock
|
83
82
|
- Rakefile
|
84
83
|
- Readme.md
|
85
84
|
- bin/seeing_is_believing
|
data/Gemfile.lock
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
seeing_is_believing (0.0.17)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
builder (3.1.4)
|
10
|
-
cucumber (1.2.1)
|
11
|
-
builder (>= 2.1.2)
|
12
|
-
diff-lcs (>= 1.1.3)
|
13
|
-
gherkin (~> 2.11.0)
|
14
|
-
json (>= 1.4.6)
|
15
|
-
diff-lcs (1.1.3)
|
16
|
-
gherkin (2.11.5)
|
17
|
-
json (>= 1.4.6)
|
18
|
-
ichannel (5.1.1)
|
19
|
-
json (1.7.6)
|
20
|
-
rake (10.0.3)
|
21
|
-
rspec (2.12.0)
|
22
|
-
rspec-core (~> 2.12.0)
|
23
|
-
rspec-expectations (~> 2.12.0)
|
24
|
-
rspec-mocks (~> 2.12.0)
|
25
|
-
rspec-core (2.12.2)
|
26
|
-
rspec-expectations (2.12.1)
|
27
|
-
diff-lcs (~> 1.1.3)
|
28
|
-
rspec-mocks (2.12.1)
|
29
|
-
|
30
|
-
PLATFORMS
|
31
|
-
ruby
|
32
|
-
|
33
|
-
DEPENDENCIES
|
34
|
-
cucumber (~> 1.2.1)
|
35
|
-
ichannel (~> 5.1.1)
|
36
|
-
rake (~> 10.0.3)
|
37
|
-
rspec (~> 2.12.0)
|
38
|
-
seeing_is_believing!
|