Commit 108fe47e by soramugi Committed by Jon Yurek

Rspec2 support

parent 3fbda79f
......@@ -8,7 +8,13 @@ RSpec::Matchers.define :have_column do |column_name|
column && column.default.to_s == @default.to_s
end
failure_message do |columns|
"expected to find '#{column_name}', default '#{@default}' in #{columns.map{|column| [column.name, column.default] }}"
if RSpec::Version::STRING.to_i >= 3
failure_message do |columns|
"expected to find '#{column_name}', default '#{@default}' in #{columns.map{|column| [column.name, column.default] }}"
end
else
failure_message_for_should do |columns|
"expected to find '#{column_name}', default '#{@default}' in #{columns.map{|column| [column.name, column.default] }}"
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment