Skip to content

Commit 9ac0c3d

Browse files
author
Carlos Silva
committed
Fix specs
1 parent c1b72f2 commit 9ac0c3d

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

Diff for: .travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ gemfile:
1515
env: DATABASE_URL=postgres://postgres@localhost/torque_postgresql_test
1616

1717
before_script:
18-
- psql -c 'create database torque_postgresql_test;' -U postgres -h localhost
18+
- psql -c 'DROP DATABASE IF EXISTS torque_postgresql_test;' -U postgres -h localhost
19+
- psql -c 'CREATE DATABASE torque_postgresql_test;' -U postgres -h localhost
20+
- bundle exec rake dump
1921

20-
# notifications:
21-
# email:
22-
2322
addons:
2423
postgresql: '9.6'
2524
code_climate:

Diff for: Rakefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ RDoc::Task.new(:rdoc) do |rdoc|
1414
rdoc.rdoc_files.include('lib/**/*.rb')
1515
end
1616

17-
desc 'Prints a schema dump of the test database'
18-
task :dump do |t|
17+
desc 'Initialize the local environment'
18+
task :environment do |t|
1919
lib = File.expand_path('../lib', __FILE__)
2020
spec = File.expand_path('../spec', __FILE__)
2121
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
2222
$LOAD_PATH.unshift(spec) unless $LOAD_PATH.include?(spec)
23+
end
2324

25+
desc 'Prints a schema dump of the test database'
26+
task dump: :environment do |t|
2427
require 'byebug'
2528
require 'spec_helper'
2629
ActiveRecord::SchemaDumper.dump

Diff for: spec/spec_helper.rb

-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
cache.instance_variable_set(:@inheritance_loaded, false)
1616
cache.instance_variable_set(:@inheritance_dependencies, {})
1717
cache.instance_variable_set(:@inheritance_associations, {})
18-
19-
ActivityBook.instance_variable_set(:@physically_inherited, nil)
20-
ActivityPost.instance_variable_set(:@physically_inherited, nil)
21-
ActivityPost::Sample.instance_variable_set(:@physically_inherited, nil)
2218
end
2319

2420
load File.join('schema.rb')

0 commit comments

Comments
 (0)