describe Item do
it 'calculates price according to a special formula' do
item = Item.new('kettle', price: 200)
item.price.should == 212
end
end
廢棄警告:當我運行測試「RSpec的規範」在控制檯中,我會得到一個棄用警告
從rspec的期許老:should
語法使用should
不顯式啓用的語法已過時。使用新的:expect
語法或明確啓用:should
與 config.expect_with(:rspec) { |c| c.syntax = :should }
代替。從E:/work/storeapp/spec/item_spec.rb調用:9:在'block(2 levels)in'中。
如果你需要更多的回溯對這些棄用來 確定在哪裏進行必要的修改,可以配置 config.raise_errors_for_deprecations!
,它會變成 廢棄警告走入誤區,給你完整的回溯。
1淘汰警告總
在0.00505秒成品(文件了0.17058秒加載) 1例,0失敗
如何避免這樣的警告?
你是什麼_Question_? – 2015-03-31 16:13:22