Sha256: 8d881de99aead0e7b19a662598a34e5b11e3f79e28a9008bda730f689347c0e2
Contents?: true
Size: 912 Bytes
Versions: 2
Compression:
Stored size: 912 Bytes
Contents
require 'machinist/active_record' require 'sham' require 'faker' require 'polyamorous' 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 PolyamorousHelper end RSpec::Matchers.define :be_like do |expected| match do |actual| actual.gsub(/^\s+|\s+$/, '').gsub(/\s+/, ' ').strip == expected.gsub(/^\s+|\s+$/, '').gsub(/\s+/, ' ').strip end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
polyamorous-1.1.0 | spec/spec_helper.rb |
polyamorous-1.0.0 | spec/spec_helper.rb |