1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/spec/support/unit/helpers/database_helpers.rb
Elliot Winkler fb6ea7afd4 Fix tests for array columns
None of the tests around array columns were working because they weren't
actually creating models with array columns. This fixes that.
2019-07-14 18:28:19 -06:00

23 lines
574 B
Ruby

module UnitTests
module DatabaseHelpers
def self.configure_example_group(example_group)
example_group.include(self)
example_group.extend(self)
end
extend self
def database_adapter
Tests::Database.instance.adapter_name
end
def postgresql?
database_adapter == :postgresql
end
alias :database_supports_array_columns? :postgresql?
alias :database_supports_uuid_columns? :postgresql?
alias :database_supports_money_columns? :postgresql?
alias :database_supports_expression_indexes? :postgresql?
end
end