Skip to content

Commit

Permalink
cleanup test-related code
Browse files Browse the repository at this point in the history
  • Loading branch information
ajb committed Dec 3, 2014
1 parent dec9aea commit b9fe954
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 590 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
Gemfile.lock
.bundle
.DS_Store
test/fixtures/test.sqlite3
test/fixtures/test.sqlite3
test/dummy/db/*
test/dummy/log/*
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ matrix:
before_script:
- cp test/travis/sync.yml config/sync.yml
- cp test/travis/sync.ru sync.ru
- bundle exec rackup sync.ru -E production 2>&1 > test.log &
- thin start -R sync.ru -p 9292 -t 1 2>&1 > test.log &
4 changes: 2 additions & 2 deletions test/dummy/config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
database: ":memory:"
pool: 5
timeout: 5000
timeout: 5000
Binary file removed test/dummy/db/test.sqlite3
Binary file not shown.
Empty file removed test/dummy/log/development.log
Empty file.
580 changes: 0 additions & 580 deletions test/dummy/log/test.log

This file was deleted.

7 changes: 1 addition & 6 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@

def setup_database
ActiveRecord::Base.send :extend, Sync::Model::ClassMethods
# ActiveRecord::Base.establish_connection(
# adapter: "sqlite3",
# database: "test/fixtures/test.sqlite3",
# pool: 5,
# timeout: 5000
# )

ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS todos")
ActiveRecord::Base.connection.execute("CREATE TABLE todos (id INTEGER PRIMARY KEY, name TEXT, complete BOOLEAN, user_id INTEGER)")

Expand Down

0 comments on commit b9fe954

Please sign in to comment.