【发布时间】:2015-03-28 23:21:07
【问题描述】:
如何设计 RSpec 测试以将 gets.chomp 方法分配给实例变量?
def choose
puts "Please enter the type you want:"
@type = gets.chomp
puts "Thank you, now please enter how many of those you want:"
@quantity = gets.chomp
end
【问题讨论】: