Class: Spec::Matchers::Migration::PrimaryKeyMatcher
- Defined in:
- lib/gems/dm-migrations-0.9.9/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.
88 89 90 |
# File 'lib/gems/dm-migrations-0.9.9/lib/spec/matchers/migration_matchers.rb', line 88 def column @column end |
Instance Method Details
#failure_message ⇒ Object
95 96 97 |
# File 'lib/gems/dm-migrations-0.9.9/lib/spec/matchers/migration_matchers.rb', line 95 def %(expected #{column.name} to be PRIMARY KEY) end |
#matches?(column) ⇒ Boolean
90 91 92 93 |
# File 'lib/gems/dm-migrations-0.9.9/lib/spec/matchers/migration_matchers.rb', line 90 def matches?(column) @column = column column.primary_key end |
#negative_failure_message ⇒ Object
99 100 101 |
# File 'lib/gems/dm-migrations-0.9.9/lib/spec/matchers/migration_matchers.rb', line 99 def %(expected #{column.name} to not be PRIMARY KEY) end |