test/test_adapter.rb in swift-1.0.1 vs test/test_adapter.rb in swift-1.0.2

- old
+ new

@@ -34,9 +34,15 @@ it 'executes with bind values' do assert @db.execute 'insert into users (name, created_at) values (?, current_timestamp)', 'Benny Arthurton' end end + describe 'escape' do + it 'escapes strings' do + assert_match %r{foo.'bar}, @db.escape("foo'bar") + end + end + describe 'prepared statements' do it 'executes via Adapter#prepare' do result = [] @db.prepare('select count(*) as n from users').execute.each {|r| result << r[:n] } assert_kind_of Fixnum, result[0]