Need RSpec to verify that a method doesn’t exist?
Trade your parens for a shiny new block.
This won’t work:
expect(@u.nothing_here_boss).to raise_error(NoMethodError)
This will:
expect { @u.nothing_here_boss }.to raise_error(NoMethodError)
Need RSpec to verify that a method doesn’t exist?
Trade your parens for a shiny new block.
This won’t work:
expect(@u.nothing_here_boss).to raise_error(NoMethodError)
This will:
expect { @u.nothing_here_boss }.to raise_error(NoMethodError)