Sha256: f86267b367f78bf48d25760311aced0c05354500bf5a834493ae18e936466063

Contents?: true

Size: 412 Bytes

Versions: 1

Compression:

Stored size: 412 Bytes

Contents

#factory girl helpers
#
#to use:
# require 'factory_stacker'
#in spec/spec_helper
module FactoryGirl

	##
	#short hand sequence
	#+column+:: symbol of column name
	def auto_sequence column
		sequence(column) { |n| "#{column.to_s} #{n}" }
	end

	##
	#short hand sequence for multiple columns
	#+columns+:: array of symboles of column names
	def auto_sequencer columns
		columns.each  { |k| sequence(k) }
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_model_stacker-0.0.3 lib/rails_model_stacker/factory_stacker.rb