开发者

why should_change macro causes deprecation warning in shoulda 2.11.0

DEPRECATION WARNING: You are using deprecated behavio开发者_C百科r which will be removed from the next major or minor release. (called from should_change at /usr/local/lib/ruby/gems/1.8/gems/shoulda-2.11.0/lib/shoulda/macros.rb:40)

How e.g. this kind of test should be changed to work without a warning with new shoulda:

fast_context "a" do
  setup do
    ...
  end

  should_change("message", :by => 1) { Messages.count }      
end


http://robots.thoughtbot.com/post/731871832/this-should-change-your-mind

Good article, explaining how to deal with should_change macros.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜