Skip to content

Commit

Permalink
Whitespaces ✂️
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
rafaelfranca committed Jan 22, 2013
1 parent 19bd2f2 commit 4de3b3d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
24 changes: 12 additions & 12 deletions activerecord/lib/active_record/core.rb
Expand Up @@ -365,18 +365,18 @@ def init_internals
pk = self.class.primary_key
@attributes[pk] = nil unless @attributes.key?(pk)

@aggregation_cache = {}
@association_cache = {}
@attributes_cache = {}
@previously_changed = {}
@changed_attributes = {}
@readonly = false
@destroyed = false
@marked_for_destruction = false
@new_record = true
@txn = nil
@_start_transaction_state = {}
@transaction = nil
@aggregation_cache = {}
@association_cache = {}
@attributes_cache = {}
@previously_changed = {}
@changed_attributes = {}
@readonly = false
@destroyed = false
@marked_for_destruction = false
@new_record = true
@txn = nil
@_start_transaction_state = {}
@transaction = nil
end
end
end
11 changes: 4 additions & 7 deletions activerecord/test/cases/connection_pool_test.rb
Expand Up @@ -328,19 +328,16 @@ def test_pool_sets_connection_visitor
assert @pool.connection.visitor.is_a?(Arel::Visitors::ToSql)
end


#make sure exceptions are thrown when establish_connection
#is called with a anonymous class
# make sure exceptions are thrown when establish_connection
# is called with a anonymous class
def test_anonymous_class_exception
anonymous = Class.new(ActiveRecord::Base)
handler = ActiveRecord::Base.connection_handler
assert_raises(RuntimeError){

assert_raises(RuntimeError) {
handler.establish_connection anonymous, nil
}
end


end
end
end

0 comments on commit 4de3b3d

Please sign in to comment.