Sha256: 2a8185447a9f190e9db160d17e619709d3771c1664beca87baf284bde328076b

Contents?: true

Size: 461 Bytes

Versions: 3

Compression:

Stored size: 461 Bytes

Contents

require 'hashie/mash'

# Fabricates test manifests (.polytrix.yml files)
LANGUAGES = %w(java ruby python nodejs c# golang php)
SAMPLE_NAMES = [
  'hello world',
  'quine',
  'my_kata'
]

Fabricator(:implementor, from: Polytrix::Implementor) do
  initialize_with { @_klass.new to_hash } # Hash based initialization
  language { LANGUAGES.sample }
  name do |attr|
    "my_#{attr[:language]}_project"
  end
  basedir do |attr|
    "sdks/#{attr[:name]}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polytrix-0.1.2 spec/fabricators/implementor_fabricator.rb
polytrix-0.1.1 spec/fabricators/implementor_fabricator.rb
polytrix-0.1.0 spec/fabricators/implementor_fabricator.rb