class MySQLExpectations::Matchers::DatabaseHaveTable
A matcher that checks a table’s collation
Attributes
database[R]
expected_table[R]
Public Class Methods
new(expected_table)
click to toggle source
# File lib/mysql_expectations/matchers/database_have_table.rb, line 12 def initialize(expected_table) @expected_table = expected_table @table = nil end
Public Instance Methods
description()
click to toggle source
# File lib/mysql_expectations/matchers/database_have_table.rb, line 22 def description "have table '#{expected_table}'" end
failure_message()
click to toggle source
# File lib/mysql_expectations/matchers/database_have_table.rb, line 26 def failure_message "expected '#{database.name}' database to have table " \ "'#{expected_table}'" end
failure_message_when_negated()
click to toggle source
# File lib/mysql_expectations/matchers/database_have_table.rb, line 31 def failure_message_when_negated "expected '#{database.name}' database not to have table " \ "'#{expected_table}'" end
matches?(database)
click to toggle source
# File lib/mysql_expectations/matchers/database_have_table.rb, line 17 def matches?(database) @database = database database.table?(expected_table) end