Last active
October 5, 2015 20:08
-
-
Save voidlily/2869129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'sequel' | |
gem 'rspec' | |
gem 'sqlite3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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