mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
fb6ea7afd4
None of the tests around array columns were working because they weren't actually creating models with array columns. This fixes that.
23 lines
574 B
Ruby
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
|