micro_test 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/mt +7 -8
  2. data/lib/micro_test/version.rb +1 -1
  3. metadata +1 -1
data/bin/mt CHANGED
@@ -130,15 +130,14 @@ if options[:pry]
130
130
  _pry_.commands.create_command "line", "View the assert line that failed." do
131
131
  def process
132
132
  stack = caller.dup
133
- if stack[0] =~ /pry-nav|pry-debugger/
134
- stack.shift while !(stack[0] =~ /pry-nav|pry-debugger/)
135
- count = 0
136
- stack.each do |line|
137
- break if line =~ /test_wrapper/
138
- count += 1
139
- end
133
+ unwanted_stack = stack.select do |line|
134
+ line =~ /pry-nav|pry-debugger/
135
+ end
136
+ if unwanted_stack.empty?
137
+ _pry_.run_command "up"
138
+ else
139
+ _pry_.run_command "up #{unwanted_stack.size + 1}"
140
140
  end
141
- _pry_.run_command "up #{count}"
142
141
  end
143
142
  end
144
143
 
@@ -1,3 +1,3 @@
1
1
  module MicroTest
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micro_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: