class MySQLExpectations::Matchers::TableHaveCollation
A matcher that checks a table’s collation
Attributes
expected_collation[R]
table[R]
Public Class Methods
new(expected_collation)
click to toggle source
# File lib/mysql_expectations/matchers/table_have_collation.rb, line 12 def initialize(expected_collation) @expected_collation = expected_collation @table = nil end
Public Instance Methods
actual_collation()
click to toggle source
# File lib/mysql_expectations/matchers/table_have_collation.rb, line 17 def actual_collation table.collation end
description()
click to toggle source
# File lib/mysql_expectations/matchers/table_have_collation.rb, line 26 def description "have collation '#{expected_collation}'" end
failure_message()
click to toggle source
# File lib/mysql_expectations/matchers/table_have_collation.rb, line 30 def failure_message "expected '#{table.name}' table to have collation " \ "'#{expected_collation}' but it was '#{table.collation}'" end
matches?(table)
click to toggle source
# File lib/mysql_expectations/matchers/table_have_collation.rb, line 21 def matches?(table) @table = table actual_collation == expected_collation end