alias 'it' in rspec

前端 未结 2 672
-上瘾入骨i
-上瘾入骨i 2020-12-31 10:40

I\'m trying to write some tests (not for code coverage, but irrelevant here) in rspec for a ROR app and need to alias describe and it, at the least. I can alias describe jus

2条回答
  •  忘掉有多难
    2020-12-31 11:10

    You want to use alias_example_to:

    RSpec.configure do |c|
      c.alias_example_to :they
    end
    

    This is part of the public API of RSpec.

提交回复
热议问题