Sha256: aa498748c10eeffd9dc6d377e240a73d4d809d3cbe527a3a56f63790ed69d904

Contents?: true

Size: 1.24 KB

Versions: 48

Compression:

Stored size: 1.24 KB

Contents

namespace :testbot do
  task :before_request do
    # This is run after you start a request (ex: rake testbot:spec)
  end
  
  task :before_run do
    # This is run by the runner after files are synced but before tests are run

    # Example: Setting up a test database
    database_yml = <<-DB_CONFIG
test:
  adapter: mysql
  encoding: utf8
  database: <%= options[:project] %>_testbot_test<%%= ENV['TEST_ENV_NUMBER'] %>
  username: root
  password:
  host: localhost
DB_CONFIG

    # database_file_path = "config/database.yml"
    # File.open(database_file_path, 'w') { |f| f.write(database_yml) }
    # 
    # # Setup databases for all instances
    # 0.upto(ENV['TEST_INSTANCES'].to_i - 1) do |instance|
    #   test_env_number = (instance == 0) ? '' : instance + 1
    #   system "mysqladmin -u root -f drop <%= options[:project] %>_testbot_test#{test_env_number}  > /dev/null 2>&1"
    #   system "mysqladmin -u root -f create <%= options[:project] %>_testbot_test#{test_env_number} > /dev/null 2>&1"
    #   system "export RAILS_ENV=test; export TEST_ENV_NUMBER=#{test_env_number}; rake db:test:load"
    # end

    # Example: Building gems
    # system "rm vendor/gems/*/ext/**/*.o > /dev/null 2>&1"
    # system "rake gems:build:force > /dev/null 2>&1"
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
testbot-0.7.12 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.11 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.9 lib/generators/testbot/templates/testbot.rake.erb
testbot_instructure-0.7.9 lib/generators/testbot/templates/testbot.rake.erb
testbot_instructure-0.7.8 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.8 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.7 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.6 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.5 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.3 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.2 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.1 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.7.0 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.9 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.8 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.7 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.6 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.5 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.4 lib/generators/testbot/templates/testbot.rake.erb
testbot-0.6.3 lib/generators/testbot/templates/testbot.rake.erb