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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0239955a4f0eed7bb1d8375eb19f46f71a1e3b4
4
- data.tar.gz: 87fb7ea1bd915f6ba4b220e1b715cf0cc7dd20cd
3
+ metadata.gz: c10c0902071eb7d3040e445ffe14eb65b4add43d
4
+ data.tar.gz: db2421790aa48eb53f3f4e79168392835e1a52c4
5
5
  SHA512:
6
- metadata.gz: 6895a441e1928973460c5870594448802e4b07b17fa6c2276eb22f79b5855d5b77f7255e7adeec99945203d0305bb38d14fdec4195f0ad04a74e7e49c56f3235
7
- data.tar.gz: 47ae5ef6f159e909f18709c38cb9cf4336557664b8a62b066b633a3c3985e33644c04cca530eafeb16456d139b0461635e7ee909ec07a7da5c2c0bf6505a2c99
6
+ metadata.gz: 2fe36a0cfefd4b0c7f378094e9ffc8f3f5324a1ab9c370c47beee66abf45811e2b6af9a919c9d84abb3470e6629cfb866372745ff8b70cbeb1aacdddaac0fae3
7
+ data.tar.gz: 36ff482a6a34c232276633d8193665f20ec3fdbe29310d7d6cee9a5195c4e08781d450e4e79bf4575daa6e41d88514aa823130ceb4ed2482801b2dd7daea285e
@@ -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
- 1 + 1
14
- require_relative 'raises_exception'
15
- 1 + 1
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
- 1 + 1 # => 2
23
- require_relative 'raises_exception' # ~> RuntimeError: ZOMG!
24
- 1 + 1
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
+
@@ -3,7 +3,6 @@ Feature:
3
3
  As the dev who wrote SeeingIsBelieving
4
4
  I want to have tests on those bugs that I found and could not have predicted
5
5
 
6
- @wip
7
6
  Scenario: No method error just fucks everything
8
7
  Given the file "no_method_error.rb":
9
8
  """
@@ -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+:/][1..-2].to_i;"\
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
@@ -1,3 +1,3 @@
1
1
  class SeeingIsBelieving
2
- VERSION = '0.0.18'
2
+ VERSION = '0.0.19'
3
3
  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.18
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
@@ -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!