Parent

Spec::Matchers::Migration::HaveColumnMatcher

Attributes

table[RW]
column_name[RW]

Public Class Methods

new(column_name) click to toggle source
    # File lib/spec/matchers/migration_matchers.rb, line 47
47:         def initialize(column_name)
48:           @column_name = column_name
49:         end

Public Instance Methods

failure_message() click to toggle source
    # File lib/spec/matchers/migration_matchers.rb, line 56
56:         def failure_message
57:           %(expected #{table} to have column '#{column_name}')
58:         end
matches?(table) click to toggle source
    # File lib/spec/matchers/migration_matchers.rb, line 51
51:         def matches?(table)
52:           @table = table
53:           table.columns.map { |c| c.name }.include?(column_name.to_s)
54:         end
negative_failure_message() click to toggle source
    # File lib/spec/matchers/migration_matchers.rb, line 60
60:         def negative_failure_message
61:           %(expected #{table} to not have column '#{column_name}')
62:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.