Do not run the datetime_select spec when Rails 3.1 && Ruby 2.3.0

This commit is contained in:
Jon Atack 2015-12-26 07:56:10 +01:00
parent 3cd5198558
commit 625741fcd1
1 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,11 @@ module Ransack
@controller.view_context.search_form_for(@s) { |f| @f = f }
end
it 'selects previously-entered time values with datetime_select' do
it 'selects previously-entered time values with datetime_select',
unless: (
RUBY_VERSION >= '2.3' &&
::ActiveRecord::VERSION::STRING.first(3) < '3.2'
) do
date_values = %w(2011 1 2 03 04 05)
# @s.created_at_eq = date_values # This works in Rails 4.x but not 3.x
@s.created_at_eq = [2011, 1, 2, 3, 4, 5] # so we have to do this