Class: Spec::Matchers::Migration::PrimaryKeyMatcher
- Inherits:
-
Object
- Object
- Spec::Matchers::Migration::PrimaryKeyMatcher
- Defined in:
- lib/spec/matchers/migration_matchers.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
87 88 89 |
# File 'lib/spec/matchers/migration_matchers.rb', line 87 def column @column end |
Instance Method Details
#failure_message ⇒ Object
94 95 96 |
# File 'lib/spec/matchers/migration_matchers.rb', line 94 def %(expected #{column.name} to be PRIMARY KEY) end |
#matches?(column) ⇒ Boolean
89 90 91 92 |
# File 'lib/spec/matchers/migration_matchers.rb', line 89 def matches?(column) @column = column column.primary_key end |
#negative_failure_message ⇒ Object
98 99 100 |
# File 'lib/spec/matchers/migration_matchers.rb', line 98 def %(expected #{column.name} to not be PRIMARY KEY) end |