Class: Spec::Matchers::Migration::NullableColumnMatcher
- Inherits:
-
Object
- Object
- Spec::Matchers::Migration::NullableColumnMatcher
- 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.
68 69 70 |
# File 'lib/spec/matchers/migration_matchers.rb', line 68 def column @column end |
Instance Method Details
#failure_message ⇒ Object
75 76 77 |
# File 'lib/spec/matchers/migration_matchers.rb', line 75 def %(expected #{column.name} to permit NULL) end |
#matches?(column) ⇒ Boolean
70 71 72 73 |
# File 'lib/spec/matchers/migration_matchers.rb', line 70 def matches?(column) @column = column ! column.not_null end |
#negative_failure_message ⇒ Object
79 80 81 |
# File 'lib/spec/matchers/migration_matchers.rb', line 79 def %(expected #{column.name} to be NOT NULL) end |