title: DatabaseCleaner errors in non rails app
body: <p>I'm trying to get DatabaseCleaner running on a non rails app where I'm using Sequel but I'm having all sorts of issues. It looks like the DB isn't being setup correctly -</p>
  
  <pre><code>RSpec.configure do |config|
    config.before(:suite) do    
      DatabaseCleaner.strategy = :transaction
      DatabaseCleaner.clean_with(:truncation)
      p DatabaseCleaner.connections
    end
  
    config.before(:each) do
      DatabaseCleaner.start
    end
  
    config.after(:each) do
      DatabaseCleaner.clean
    end
  end
  </code></pre>
  
  <p>Running rspec returns - </p>
  
  <pre><code>ruby-1.9.2-p290/gems/database_cleaner-0.8.0/lib/database_cleaner/sequel/truncation.rb:12:in `clean': undefined method `url' for :default:Symbol (NoMethodError)
    from /Users/tim/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.8.0/lib/database_cleaner/base.rb:39:in `clean_with'
    from /Users/tim/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.8.0/lib/database_cleaner/configuration.rb:62:in `block in clean_with'
    from /Users/tim/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.8.0/lib/database_cleaner/configuration.rb:62:in `each'
    from /Users/tim/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.8.0/lib/database_cleaner/configuration.rb:62:in `clean_with'
  </code></pre>
  
  <p>The line this is failing on - </p>
  
  <pre><code>case db_type= db.url.sub(/:.+/,'').to_sym
  </code></pre>
  
  <p>If I remove 'DatabaseCleaner.clean_with(:truncation)' I get the following, notice the DB is set to :default and not :test</p>
  
  <pre><code>[#&lt;DatabaseCleaner::Base:0x007fdbe41825f0 @autodetected=true, @orm=:sequel, @strategy=#&lt;DatabaseCleaner::Sequel::Transaction:0x007fdbe416b328 @db=:default&gt;&gt;]
  
  An error occurred in an after hook
  NoMethodError: undefined method `resume' for nil:NilClass occurred at /Users/tim/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.8.0/lib/database_cleaner/sequel/transaction.rb:22:in `clean'
  </code></pre>
  
  <p>Both errors indicate that the DB hasn't been set, but I can't see why. Any ideas?</p>