提交 e06878c2 编写于 作者: J Jeremy Kemper

Merge branch 'master' of git@github.com:rails/rails

......@@ -23,8 +23,8 @@ def self.postgresql_connection(config) # :nodoc:
config = config.symbolize_keys
host = config[:host]
port = config[:port] || 5432
username = config[:username].to_s
password = config[:password].to_s
username = config[:username].to_s if config[:username]
password = config[:password].to_s if config[:password]
if config.has_key?(:database)
database = config[:database]
......
......@@ -27,7 +27,7 @@
class AssociationsTest < ActiveRecord::TestCase
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
:computers
:computers, :people, :readers
def test_include_with_order_works
assert_nothing_raised {Account.find(:first, :order => 'id', :include => :firm)}
......@@ -45,7 +45,7 @@ def test_should_construct_new_finder_sql_after_create
assert_equal [], person.readers.find(:all)
person.save!
reader = Reader.create! :person => person, :post => Post.new(:title => "foo", :body => "bar")
assert_equal [reader], person.readers.find(:all)
assert person.readers.find(reader.id)
end
def test_force_reload
......
......@@ -116,8 +116,9 @@ def test_cache_is_expired_by_habtm_update
def test_cache_is_expired_by_habtm_delete
ActiveRecord::Base.connection.expects(:clear_query_cache).times(2)
ActiveRecord::Base.cache do
c = Category.find(:first)
p = Post.find(:first)
c = Category.find(1)
p = Post.find(1)
assert p.categories.any?
p.categories.delete_all
end
end
......
......@@ -14,7 +14,7 @@
# for now, use the no-passwd sudoers approach (documented in ci_setup_notes.txt)
# A security hole, but there is nothing valuable on rails CI box anyway.
build_results[:geminstaller] = system 'sudo geminstaller --config=#{root_dir}/ci/geminstaller.yml --exceptions'
build_results[:geminstaller] = system "sudo geminstaller --config=#{root_dir}/ci/geminstaller.yml --exceptions"
cd "#{root_dir}/activesupport" do
puts
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册