# File lib/spec/matchers/migration_matchers.rb, line 47
47: definitialize(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: deffailure_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: defmatches?(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: defnegative_failure_message
61: %(expected #{table} to not have column '#{column_name}')
62: end