1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

added spec to test_command_processor.rb that ensures commands with :interpolate=>false do NOT have interpolate_string called in their processing

This commit is contained in:
John Mair 2011-06-10 23:19:13 +12:00
parent 5effe7a6e8
commit 2e2bc9b136

View file

@ -190,4 +190,14 @@ describe "Pry::CommandProcessor" do
command.should == nil
end
it 'commands that have :interpolate => false should not be interpolated (interpolate_string should *not* be called)' do
@pry.commands.command("boast", "", :interpolate => false) {}
# remember to use '' instead of "" when testing interpolation or
# you'll cause yourself incredible confusion
lambda { @command_processor.command_matched('boast #{c}', binding) }.should.not.raise NameError
end
end