1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/test/test_helper.rb
John Mair 18553b4beb Updated more docs and formatting.
Changed tests to remove opts[:output] and then removed opts[:output]; replaced with output method, changed prompt in example_commands.rb to have a math* wait prompt. Added bullet points to examples in README.markdown. Added more info on TexPlay and Gosu for example_image_edit
2011-01-21 22:34:22 +13:00

38 lines
559 B
Ruby

class Module
public :remove_const
end
class InputTester
def initialize(*actions)
@orig_actions = actions.dup
@actions = actions
end
def readline(*)
@actions.shift
end
def rewind
@actions = @orig_actions.dup
end
end
class Pry
# null output class - doesn't write anywwhere.
class NullOutput
def self.puts(*) end
end
end
class CommandTester < Pry::CommandBase
command "command1", "command 1 test" do
output.puts "command1"
end
command "command2", "command 2 test" do |arg|
output.puts arg
end
end