RSpec - WrongScopeError: pending not available in example group

I am getting this error:

method_missing ': expect

not available in the example group (such as a describe

or context

). It is only available inside some examples (e.g., it

) or structures that are performed to Example action (e.g. before

, let

etc). (RSpec :: Basic :: ExampleGroup :: WrongScopeError)

For this specification:

describe 'canary test' do
    expect(true).to be true
end

      

+3


source to share


1 answer


You need to do validation inside a block, for example. could you:



describe 'canary test' do
  it 'it true' do
    expect(true).to be true
  end
end

      

+6


source







All Articles