Skip to content

Instantly share code, notes, and snippets.

@davejlong
Created February 18, 2014 16:23
Show Gist options
  • Select an option

  • Save davejlong/9074198 to your computer and use it in GitHub Desktop.

Select an option

Save davejlong/9074198 to your computer and use it in GitHub Desktop.
Failure/Error: expect{ FileImporter.new }.not_to raise_error ArgumentError
ArgumentError:
`expect { }.not_to raise_error(SpecificErrorClass)` is not valid, use `expect { }.not_to raise_error` (with no args) instead
class FileImporter
attr_accessor :file
def initialize(file=nil)
@file = file
end
end
describe FileImporter do
it 'supports optional file on initializer' do
expect { FileImporter.new }.not_to raise_error ArgumentError
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment