spec/spec_helper.rb in ransack-2.4.1 vs spec/spec_helper.rb in ransack-2.4.2

- old
+ new

@@ -1,7 +1,7 @@ require 'machinist/active_record' -require 'polyamorous/polyamorous.rb' +require 'polyamorous/polyamorous' require 'sham' require 'faker' require 'ransack' require 'action_controller' require 'ransack/helpers' @@ -15,19 +15,20 @@ I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'support', '*.yml')] Dir[File.expand_path('../{helpers,support,blueprints}/*.rb', __FILE__)] .each { |f| require f } +Faker::Config.random = Random.new(0) 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(' ') } - only_admin { Faker::Lorem.words(3).join(' ') } - only_search { Faker::Lorem.words(3).join(' ') } - only_sort { Faker::Lorem.words(3).join(' ') } + tag_name { Faker::Lorem.words(number: 3).join(' ') } + note { Faker::Lorem.words(number: 7).join(' ') } + only_admin { Faker::Lorem.words(number: 3).join(' ') } + only_search { Faker::Lorem.words(number: 3).join(' ') } + only_sort { Faker::Lorem.words(number: 3).join(' ') } notable_id { |id| id } end RSpec.configure do |config| config.alias_it_should_behave_like_to :it_has_behavior, 'has behavior'