Then { expect(:foo).to eqish arg_that {|arg| arg.kind_of?(String) } }
Asking the block passed to arg_that its source will return a string of the entire line, not only what was passed to the block.
I imagine this is just a limitation of what #source_location tells you (e.g. no column information). Is there any other way to get at this? Would an AST approach perhaps work?
Given a line like this:
Asking the block passed to
arg_that
itssource
will return a string of the entire line, not only what was passed to the block.I imagine this is just a limitation of what
#source_location
tells you (e.g. no column information). Is there any other way to get at this? Would an AST approach perhaps work?