Rubymine will not step inside any code blocks in RSpec
I have just installed Rubymine on my MAC laptop running OSX 10.11.3
I'm trying to use it to teach myself RSpec but am having a weird problem; when I run the code inside Rubymine, it doesn't step inside any code blocks, either in debug or run mode.
NOTE: I've just discovered what the problem is but will post this in case anyone lese hits the same issue. I was following an online tutorial that recommended the #method_name syntax shown below. This # caused the problem I detail below. Removing it allowed me to debug and run normally. Perhaps this is a bug in Rubymine?
The problem -
I have this simple file:
require 'rspec'
describe '#enforcement_search' do
before(:all) do
puts "HERE"
cfg = ENV["API_CFG"]
puts "ENV - #{cfg}"
end
context 'with correct parameters' do
it 'returns a record' do
puts "HERE"
end
end
end
When I run it from the command line I see the puts statements as expected. Within Rubymine I see nothing in the console.
If I step through it in the debugger, I hit the line
before(:all) do
but then skip on to:
context 'with correct parameters' do
it 'returns a record' do
Both of which are hit if I put a break on them, but then it skips over the puts statement in the block.
So it seems that putting the # in the describe causes RM to skip all content in code blocks...
Please sign in to leave a comment.
Hello, Bradley,
sorry for the delay. Could you please check how it goes in the last RubyMine EAP (2016.2), there should be no problems with running and debugging this sample.