spec/ransack/helpers/form_builder_spec.rb in ransack-1.7.0 vs spec/ransack/helpers/form_builder_spec.rb in ransack-1.8.0

- old
+ new

@@ -5,11 +5,10 @@ describe FormBuilder do router = ActionDispatch::Routing::RouteSet.new router.draw do resources :people, :comments, :notes - get ':controller(/:action(/:id(.:format)))' end include router.url_helpers # FIXME: figure out a cleaner way to get this behavior @@ -20,10 +19,14 @@ @controller.view_context_class.class_eval { include router.url_helpers } @s = Person.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 html = @f.datetime_select( :created_at_eq, :use_month_numbers => true, :include_seconds => true