0
如何为以下内容编写rspec测试?如何为此编写rspec 3.1测试
是获取这是传递的值... 90A14F 1.4
def classname
def init
@input_colors = Array.new
end
def speak
puts "enter your line of color values"
result = STDIN.gets.chomp
new_result = result.gsub!(/([\s])+/,':')
@input_colors << new_result
end
end
我怎样写一个RSpec 3.1测试对于测试,如果gets.chomp是这样讲的方法... 90A14F 1.4
他们将得到一个实例var @input_colors == [“90A14F:1.4”]