Snippet extractor not extracting complete block snippet
Created by: myronmarston
For some refactoring I'm doing I broke some of the filtering specs and tagged them with :pending
. Weirdly, the failure from this 3-line expression containing a block results in a snippet only of the first two lines:
5.1) Failure/Error:
expect(world).to receive(:preceding_declaration_line).at_least(:once) do |v|
preceeding_declaration_lines[v]
(#<RSpec::Core::World:0x007fdbc452e188>).preceding_declaration_line(*(any args))
expected: at least 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/core/metadata_filter_spec.rb:55:in `block (4 levels) in <module:Core>'
# ./spec/support/sandboxing.rb:14:in `block (3 levels) in <top (required)>'
# ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
I believe it should include the block's end
so it is a complete valid ruby expression. I pushed a branch (demo-incomplete-snippet) with the exact state I'm at so we have a reproduction case, but whoever works on this should not work off the code on that branch -- just use it to repro.
@yujinakayama, can you take a look at this?