Skip to content

Commit

Permalink
Randomize test order and add bin file to fix migrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Clark committed Jun 10, 2016
1 parent 59ee46a commit 06e4a37
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
4 changes: 4 additions & 0 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
4 changes: 4 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
29 changes: 29 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
require 'pathname'

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)

Dir.chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:

puts '== Installing dependencies =='
system 'gem install bundler --conservative'
system 'bundle check || bundle install'

# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# end

puts "\n== Preparing database =="
system 'bin/rake db:setup'

puts "\n== Removing old logs and tempfiles =="
system 'rm -f log/*'
system 'rm -rf tmp/cache'

puts "\n== Restarting application server =="
system 'touch tmp/restart.txt'
end
3 changes: 3 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql

# Randomize the order test cases are executed.
config.active_support.test_order = :random

# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
# when true, eager loads all registered config.eager_load_namespaces.
Expand Down

0 comments on commit 06e4a37

Please sign in to comment.