1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00
activerecord-hackery--ransack/spec/spec_helper.rb
2011-03-30 20:31:39 -04:00

28 lines
No EOL
703 B
Ruby

require 'machinist/active_record'
require 'sham'
require 'faker'
Time.zone = 'Eastern Time (US & Canada)'
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(' ') }
end
RSpec.configure do |config|
config.before(:suite) { Schema.create }
config.before(:all) { Sham.reset(:before_all) }
config.before(:each) { Sham.reset(:before_each) }
config.include RansackHelper
end
require 'ransack'