386: def should_have_db_columns(*columns)
387: column_type, precision, limit, default, null, scale, sql_type =
388: get_options!(columns, :type, :precision, :limit,
389: :default, :null, :scale, :sql_type)
390: columns.each do |name|
391: matcher = have_db_column(name).
392: of_type(column_type).
393: with_options(:precision => precision, :limit => limit,
394: :default => default, :null => null,
395: :scale => scale, :sql_type => sql_type)
396: should matcher.description do
397: assert_accepts(matcher, subject)
398: end
399: end
400: end