Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonOmo committed Sep 5, 2024
1 parent 9fb267c commit 69012e3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ jobs:
PGHOST: 127.0.0.1
PGUSER: postgres
PGPASSWORD: postgres
TESTOPTS: --verbose --profile=3
TESTOPTS: --profile=3
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ group :development do
gem "bcrypt"
gem "sqlite3"
gem "msgpack"

# Still used a little bit in our tests.
# TODO: get rid of the dependency
gem "mocha"
end
15 changes: 9 additions & 6 deletions test/cases/ddl_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_relative "../test_helper"

module PostGIS
class DDLTest < ActiveSupport::TestCase
class DDLTest < ActiveRecord::TestCase
def test_spatial_column_options
[
:geography,
Expand Down Expand Up @@ -279,11 +279,14 @@ def test_no_query_spatial_column_info
t.string "name"
end
klass.reset_column_information
# `all` queries column info from the database - it should not be called when klass.columns is called
ActiveRecord::ConnectionAdapters::PostGIS::SpatialColumnInfo.any_instance.expects(:all).never
# first column is id, second is name
refute klass.columns[1].spatial?
assert_nil klass.columns[1].has_z

# `SpatialColumnInfo#all` queries column info from the database.
# It should not be called when klass.columns is called
assert_queries_count(0) do
# first column is id, second is name
refute klass.columns[1].spatial?
assert_nil klass.columns[1].has_z
end
end

# Ensure that null contraints info is getting captured like the
Expand Down
2 changes: 2 additions & 0 deletions test/excludes/CounterCacheTest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
exclude "test_increment_counter", TRIAGE_MSG
exclude "test_decrement_counter_by_specific_amount", TRIAGE_MSG
exclude "test_update_counters_with_touch:_true", TRIAGE_MSG
exclude "test_update_counters_doesn't_touch_timestamps_by_default", TRIAGE_MSG
exclude "test_reset_counter_performs_query_for_correct_counter_with_touch:_true", TRIAGE_MSG
exclude "test_update_counters_doesn't_touch_timestamps_with_touch:_[]", TRIAGE_MSG
exclude "test_reset_multiple_counters_with_touch:_%i(_updated_at_written_on_)", TRIAGE_MSG
exclude "test_update_counter_for_decrement", TRIAGE_MSG
exclude "test_the_passed_symbol_needs_to_be_an_association_name_or_counter_name", TRIAGE_MSG
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def time_it
end
end

module ActiveRecord
module ActiveSupport
class TestCase
include TestTimeoutHelper

Expand Down

0 comments on commit 69012e3

Please sign in to comment.