我收到此错误:
method_missing':
expect
在示例组(例如adescribe
或context
block)上不可用。它只能从各实施例(例如内it
的块),或从该中的示例(例如范围运行构建体before
,let
等)。(RSpec :: Core :: ExampleGroup :: WrongScopeError)
对于此规格:
describe 'canary test' do
expect(true).to be true
end
您需要将测试包装在一个块中,例如,您可能需要:
describe 'canary test' do
it 'it true' do
expect(true).to be true
end
end
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句