Skip to content
Browse files

Move database_connection, database_models and octopus_helper to spec/…

…support
  • Loading branch information...
1 parent e8114af commit a3fc69fda8c662d9f72faa47b7edec3011667b51 @sobrinho sobrinho committed
View
6 spec/spec_helper.rb
@@ -1,18 +1,18 @@
require "rubygems"
-require File.expand_path(File.dirname(__FILE__)) + "/database_connection"
require "bundler/setup"
require "mysql2"
require "active_record"
require "action_controller"
require "octopus"
-require "octopus_helper"
+require "support/database_connection"
+require "support/octopus_helper"
MIGRATIONS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), 'migrations'))
RSpec.configure do |config|
config.before(:each) do
Octopus.stub!(:directory).and_return(File.dirname(__FILE__))
- require "database_models"
+ require "support/database_models"
clean_all_shards()
end
end
View
3 spec/database_connection.rb → spec/support/database_connection.rb
@@ -1,4 +1 @@
-require 'rubygems'
-require 'active_record'
-
ActiveRecord::Base.establish_connection(:adapter => "mysql2", :database => "octopus_shard1", :username => "root", :password => "")
View
0 spec/database_models.rb → spec/support/database_models.rb
File renamed without changes.
View
0 spec/octopus_helper.rb → spec/support/octopus_helper.rb
File renamed without changes.

0 comments on commit a3fc69f

Please sign in to comment.
Something went wrong with that request. Please try again.