Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## database.yaml
- development:
- adapter: sqlite3
- database: db/development.db
- # Warning: The database defined as 'test' will be erased and
- # re-generated from your development database when you run 'rake'.
- # Do not set this db to the same as development or production.
- test:
- adapter: sqlite3
- database: db/test.db
- #verbosity: silent
- production:
- adapter: postgresql
- database: wimm_production
- username: wimm
- password: wimm
- host: localhost
- ## migration
- class CreateExpenses < ActiveRecord::Migration
- def self.up
- create_table :expenses do |t|
- t.column :created_at, :datetime
- t.column :updated_at, :datetime
- t.column :spent_at, :date
- t.column :spent_on, :string
- t.column :amount, :integer
- end
- end
- def self.down
- drop_table :expenses
- end
- end
- ## rake output
- c:\dev\tools\ruby\bin\ruby -I.;lib;test -rtest/unit -e "%w[test/functional/expenses_controller_test.rb test/unit/expense_test.rb].each { |f| require f }" | unit_diff -u
- Loaded suite -e
- Started
- EEEEEEEE
- Finished in 0.24 seconds.
- 1) Error:
- test_truth(ExpenseTest):
- ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: expenses: DELETE FROM expenses WHERE 1=1
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:154:in `execute'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:361:in `catch_schema_changes'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:154:in `execute'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:164:in `delete'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:285:in `delete_existing_fixtures'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:256:in `create_fixtures'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:256:in `create_fixtures'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:59:in `transaction'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:255:in `create_fixtures'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/base.rb:890:in `silence'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:248:in `create_fixtures'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:581:in `load_fixtures'
- C:/dev/projects/htdocs/wimm/tags/wimm/config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:535:in `setup'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement