spec/lib/backends/sqlite/value_spec.rb in picky-4.17.1 vs spec/lib/backends/sqlite/value_spec.rb in picky-4.18.0
- old
+ new
@@ -23,11 +23,11 @@
db.stub! :db => client
end
it 'initializes the client' do
client.stub! :execute
- db.should_receive(:lazily_initialize_client).once.with
+ db.should_receive(:db).exactly(4).times.with
db.dump_sqlite Hash.new
end
it 'executes something' do
db.stub! :lazily_initialize_client
@@ -35,10 +35,10 @@
client.should_receive(:execute).at_least(1).times
db.dump_sqlite Hash.new
end
it 'inserts keys and values' do
- db.stub! :lazily_initialize_client
+ # db.stub! :db
client.stub! :execute # We only want to test the insert statements.
client.should_receive(:execute).once.with 'insert into key_value values (?,?)', 'a', '[1,2,3]'
client.should_receive(:execute).once.with 'insert into key_value values (?,?)', 'b', '[4,5,6]'