Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
broke a bunch of shit, but no longer need embedded rails app for testing
- Loading branch information
Showing
6 changed files
with
59 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
source :rubygems | ||
|
||
# Specify your gem's dependencies in acts_as_archival.gemspec | ||
source "https://rubygems.org" | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log") | ||
|
||
load(File.dirname(__FILE__) + "/schema.rb") if File.exist?(File.dirname(__FILE__) + "/schema.rb") | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
$:.unshift(File.dirname(__FILE__) + '/../lib') | ||
require "bundler/setup" | ||
require "test/unit" | ||
require "active_record" | ||
require "assertions" | ||
require "logger" | ||
require "pry" | ||
|
||
require "acts_as_archival" | ||
|
||
ENV["RAILS_ENV"] = "test" | ||
["aaa_test_app/config/environment", "local_test_helper"].each do |file_to_load| | ||
require_relative file_to_load | ||
end | ||
database_config = File.dirname(__FILE__) + "/database.yml" | ||
logfile = File.dirname(__FILE__) + "/debug.log" | ||
schema_file = File.dirname(__FILE__) + "/schema.rb" | ||
|
||
dbconfig = YAML.load File.read(database_config) | ||
|
||
require 'rails/test_help' | ||
require 'assertions' | ||
ActiveRecord::Base.logger = Logger.new(logfile) | ||
ActiveRecord::Base.establish_connection(dbconfig) | ||
load(schema_file) if File.exist?(schema_file) | ||
|
||
%w(hole mole muskrat squirrel kitty puppy ship rat orange flea snake beaver tick ixodidae).each do |a| | ||
require File.expand_path(File.dirname(__FILE__) + "/" + a) | ||
%w(hole mole muskrat squirrel kitty puppy ship rat orange flea snake beaver tick ixodidae).each do |test_class_file| | ||
require_relative test_class_file | ||
end | ||
|
||
class ActiveSupport::TestCase | ||
self.use_transactional_fixtures = true | ||
|
||
self.use_instantiated_fixtures = false | ||
|
||
fixtures :all | ||
use_transactional_fixtures = true | ||
use_instantiated_fixtures = false | ||
end |