Sha256: d345fe46890d0a4516d1c4766cf9ec16307ab3096e1aebce793b8775280bd37b

Contents?: true

Size: 405 Bytes

Versions: 3

Compression:

Stored size: 405 Bytes

Contents

# Read about factories at https://github.com/thoughtbot/factory_girl

FactoryGirl.define do
	factory :language, class: Odania::Language do
		sequence(:name) { |n| "Language#{n}" }
		sequence(:iso_639_1) { |n| "short#{n}" }
	end

	factory :default_language, class: Odania::Language do
		name 'German'
		iso_639_1 'de'
		initialize_with { Odania::Language.find_or_create_by(iso_639_1: iso_639_1) }
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
odania_core-0.0.3 test/factories/languages.rb
odania_core-0.0.2 test/factories/languages.rb
odania_core-0.0.1 test/factories/languages.rb