spec/spec_helper.rb in magic_grid-0.9.3.1 vs spec/spec_helper.rb in magic_grid-0.10.0

- old
+ new

@@ -1,11 +1,36 @@ +# require 'bundler' +# Bundler.setup + +unless ENV['TRAVIS'] + require 'simplecov' + SimpleCov.start do + add_filter '/spec/' + add_filter '/test/' + end +end + require 'action_view' require 'rails' -require 'will_paginate' -require 'will_paginate/array' -require 'will_paginate/view_helpers' +begin + require 'will_paginate' + require 'will_paginate/array' + require 'will_paginate/view_helpers' + puts "Testing with WillPaginate" +rescue LoadError + puts "skipping WillPaginate" +end + +begin + require 'kaminari' + require 'kaminari/models/array_extension' + puts "Testing with Kaminari" +rescue LoadError + puts "skipping Kaminari" +end + Rails.backtrace_cleaner.remove_silencers! # I has a sad :-( module Rails def logger.debug(*ignore) end @@ -33,10 +58,11 @@ config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run :focus config.include ActionView::Helpers - config.include WillPaginate::ViewHelpers + config.include WillPaginate::ViewHelpers if Module.const_defined? :WillPaginate + config.include Kaminari::ActionViewExtension if Module.const_defined? :Kaminari config.include ActionFaker # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run.