rspec expect to Posted on 2011-07-19 In rspec 期望改变值或抛出异常 expect {}.to change {}.from().to() expect {}.to raise_error(YourMenthodError)