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)
Using continuous integration? Using RSpec? Selectively configuring RSpec to output JUnit with RspecJunitFormatter but finding your output file to be empty?
You need to configure your output file before you set your formatter(s).
Allons-y:
RSpec.configure do |config| # ... # Use JUnit output for CI if ENV["BAMBOO_INSTALL"] config.output_stream = 'rspec.xml' config.formatter = RspecJunitFormatter end end