1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/spec/spec_helper.rb

27 lines
686 B
Ruby
Raw Normal View History

2007-12-30 14:35:44 -05:00
require 'rubygems'
require 'spec'
2007-12-30 20:35:23 -05:00
require File.join(File.dirname(__FILE__), '..', 'lib', 'sql_algebra')
require File.join(File.dirname(__FILE__), 'spec_helpers', 'be_like')
2008-01-04 02:41:43 -05:00
ActiveRecord::Base.configurations = {
'sql_algebra_test' => {
:adapter => 'mysql',
:username => 'root',
:password => 'password',
:encoding => 'utf8',
:database => 'sql_algebra_test',
},
}
ActiveRecord::Base.establish_connection 'sql_algebra_test'
2008-01-05 18:24:46 -05:00
class Hash
def shift
returning to_a.sort { |(key1, value1), (key2, value2)| key1.hash <=> key2.hash }.shift do |key, value|
delete(key)
end
end
end
2007-12-30 20:35:23 -05:00
Spec::Runner.configure do |config|
config.include(BeLikeMatcher)
end