Module: MySQLExpectations::Matchers
- Defined in:
- lib/mysql_expectations/matchers.rb,
lib/mysql_expectations/matchers/table_have_key.rb,
lib/mysql_expectations/matchers/table_have_field.rb,
lib/mysql_expectations/matchers/database_have_table.rb,
lib/mysql_expectations/matchers/table_have_collation.rb,
lib/mysql_expectations/matchers/table_have_engine_type.rb,
lib/mysql_expectations/matchers/database_only_have_tables.rb
Overview
Allows assertions on a database
Defined Under Namespace
Classes: DatabaseHaveTable, DatabaseOnlyHaveTables, HaveEngineType, HaveField, HaveKey, TableHaveCollation
Instance Method Summary collapse
-
#have_collation(expected_collation) ⇒ Object
Table Matchers.
- #have_engine_type(expected_engine_type) ⇒ Object
- #have_field(expected_field_name) ⇒ Object
- #have_key(expected_key) ⇒ Object
-
#have_table(expected_table_name) ⇒ Object
Database Matchers.
- #only_have_tables(*expected_table_names) ⇒ Object
Instance Method Details
#have_collation(expected_collation) ⇒ Object
Table Matchers
34 35 36 |
# File 'lib/mysql_expectations/matchers.rb', line 34 def have_collation(expected_collation) TableHaveCollation.new(expected_collation) end |
#have_engine_type(expected_engine_type) ⇒ Object
38 39 40 |
# File 'lib/mysql_expectations/matchers.rb', line 38 def have_engine_type(expected_engine_type) HaveEngineType.new(expected_engine_type) end |
#have_field(expected_field_name) ⇒ Object
42 43 44 |
# File 'lib/mysql_expectations/matchers.rb', line 42 def have_field(expected_field_name) HaveField.new(expected_field_name) end |
#have_key(expected_key) ⇒ Object
46 47 48 |
# File 'lib/mysql_expectations/matchers.rb', line 46 def have_key(expected_key) HaveKey.new(expected_key) end |
#have_table(expected_table_name) ⇒ Object
Database Matchers
22 23 24 |
# File 'lib/mysql_expectations/matchers.rb', line 22 def have_table(expected_table_name) DatabaseHaveTable.new(expected_table_name) end |
#only_have_tables(*expected_table_names) ⇒ Object
26 27 28 |
# File 'lib/mysql_expectations/matchers.rb', line 26 def only_have_tables(*expected_table_names) DatabaseOnlyHaveTables.new(*expected_table_names) end |