spec/spec_helper.rb in ransack-1.1.0 vs spec/spec_helper.rb in ransack-1.2.0

- old
+ new

@@ -4,29 +4,35 @@ require 'ransack' Time.zone = 'Eastern Time (US & Canada)' I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'support', '*.yml')] -Dir[File.expand_path('../{helpers,support,blueprints}/*.rb', __FILE__)].each do |f| +Dir[File.expand_path('../{helpers,support,blueprints}/*.rb', __FILE__)] +.each do |f| require f end Sham.define do - name { Faker::Name.name } - title { Faker::Lorem.sentence } - body { Faker::Lorem.paragraph } - salary {|index| 30000 + (index * 1000)} - tag_name { Faker::Lorem.words(3).join(' ') } - note { Faker::Lorem.words(7).join(' ') } + name { Faker::Name.name } + title { Faker::Lorem.sentence } + body { Faker::Lorem.paragraph } + salary { |index| 30000 + (index * 1000) } + tag_name { Faker::Lorem.words(3).join(' ') } + note { Faker::Lorem.words(7).join(' ') } + only_admin { Faker::Lorem.words(3).join(' ') } + only_search { Faker::Lorem.words(3).join(' ') } + only_sort { Faker::Lorem.words(3).join(' ') } + notable_id { |id| id } end RSpec.configure do |config| config.alias_it_should_behave_like_to :it_has_behavior, 'has behavior' config.before(:suite) do puts '=' * 80 connection_name = ActiveRecord::Base.connection.adapter_name - puts "Running specs against #{connection_name}, ActiveRecord #{ActiveRecord::VERSION::STRING} and ARel #{Arel::VERSION}..." + puts "Running specs against #{connection_name}, ActiveRecord #{ + ActiveRecord::VERSION::STRING} and ARel #{Arel::VERSION}..." puts '=' * 80 Schema.create end config.before(:all) { Sham.reset(:before_all) }