Skip to content

Instantly share code, notes, and snippets.

@voidlily voidlily/Gemfile
Last active Oct 5, 2015

Embed
What would you like to do?
source 'http://rubygems.org'
gem 'sequel'
gem 'rspec'
gem 'sqlite3'
GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.1)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
sequel (3.36.1)
sqlite3 (1.3.6)
PLATFORMS
ruby
DEPENDENCIES
rspec
sequel
sqlite3
require 'rubygems'
require 'sequel'
require 'rspec'
describe 'stack overflow spec' do
before(:all) do
DB = Sequel.sqlite
end
before(:each) do
Sequel::Dataset.any_instance.stub(:import).and_raise('db error')
end
it 'raises db error' do
expect { DB[:test].import([:a], [[1],[2],[3]]) }.to raise_error('db error')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.