with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rubygems' | |
gem 'minitest' | |
require 'minitest/autorun' | |
require 'action_controller/test_case' | |
require 'miniskirt' | |
require 'capybara/rails' |
<?php | |
/** | |
* Define type of server | |
* | |
* Depending on the type other stuff can be configured | |
* Note: Define them all, don't skip one if other is already defined | |
*/ | |
define( 'DB_CREDENTIALS_PATH', dirname( ABSPATH ) ); // cache it for multiple use |
require 'minitest/autorun' | |
module MiniTest::Assertions | |
def assert_changes(obj, method, exp_diff) | |
before = obj.send method | |
yield | |
after = obj.send method | |
diff = after - before | |
assert_equal exp_diff, diff, "Expected #{obj.class.name}##{method} to change by #{exp_diff}, changed by #{diff}" |
module AuthHelper | |
def http_login | |
user = 'username' | |
pw = 'password' | |
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
end | |
end | |
module AuthRequestHelper | |
# |
#!/bin/bash | |
git clone $1 --depth=1 | |
# cd into the repo directory | |
a=$1 | |
b="${a##*/}"; | |
cd "${b%.*}" | |
for i in {1..100000..10}; do git fetch --depth=$i; done | |
git fetch --unshallow |