How to avoid deprecation warning for stub_chain in RSpec 3.0?

后端 未结 4 1832
清歌不尽
清歌不尽 2020-12-13 09:26

When I run a test with stub_chain, I\'ll get a deprecation warning.

describe \"stubbing a chain of methods\" do
  subject { Object.new }

  context \"given s         


        
4条回答
  •  眼角桃花
    2020-12-13 10:00

    For anybody who wants to upgrade an old project to the new syntax, there is a tool here.

    As mentioned in the Relish blog, they will probably move the should syntax into an external gem in the future, this leads me to believe that it will eventually be made obsolete.

提交回复
热议问题