Topic: Test errors due to Table 'sampleapp_test.assets' doesn't exist: DELETE

Hello,

I have some basic tests setup to for ActiveMerchant actions but they are all getting the following error:

Running:

rake test

Each test gives the following error:

ActiveRecord::StatementInvalid: Mysql2::Error: Table 'sampleapp_test.assets' doesn't exist: DELETE FROM `assets`

I've tried searching but haven't found any information on this error.  Is there something simple I'm overlooking?
Running Rails 3.1.3

And here is config/environments/test.rb

...
  config.cache_classes = true

  # Configure static asset server for tests with Cache-Control for performance
  config.serve_static_assets = false
  config.static_cache_control = "public, max-age=3600"

  # Log error messages when you accidentally call methods on nil
  config.whiny_nils = true

  # Show full error reports and disable caching
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false

  # Raise exceptions instead of rendering exception templates
  config.action_dispatch.show_exceptions = false

  # Disable request forgery protection in test environment
  config.action_controller.allow_forgery_protection    = false

  # Tell Action Mailer not to deliver emails to the real world.
  # The :test delivery method accumulates sent emails in the
  # ActionMailer::Base.deliveries array.
  config.action_mailer.delivery_method = :test

  # Use SQL instead of Active Record's schema dumper when creating the test database.
  # This is necessary if your schema can't be completely dumped by the schema dumper,
  # like if you have constraints or database-specific column types
  # config.active_record.schema_format = :sql
  
  # Print deprecation notices to the stderr
  config.active_support.deprecation = :stderr
  
  config.after_initialize do
    ActiveMerchant::Billing::Base.mode = :test
    
    OrderTransaction.gateway = ActiveMerchant::Billing::BogusGateway.new
  end

...

Thanks for any suggestions / direction.

Re: Test errors due to Table 'sampleapp_test.assets' doesn't exist: DELETE

Have you tried to run:

bundle exec rake db:test:prepare

before?