Sha256: 154de2a50659a63364e4bfd02a370a25bf08d0b314d4bbfa130805ce53133ada
Contents?: true
Size: 792 Bytes
Versions: 20
Compression:
Stored size: 792 Bytes
Contents
require 'support/matchers/base' module ChronoTest::Matchers module Schema class BeInSchema < ChronoTest::Matchers::Base def initialize(expected) @expected = expected @expected = '"$user", public' if @expected == :default end def description 'be in schema' end def failure_message "expected to be in schema #@expected, but was in #@current" end def failure_message_when_negated "expected to be in schema #@current, but was in #@expected" end def matches?(*) @current = select_value(<<-SQL, [], 'Current schema') SHOW search_path SQL @current == @expected end end def be_in_schema(schema) BeInSchema.new(schema) end end end
Version data entries
20 entries across 20 versions & 1 rubygems