Sha256: f78d87c2e35196236c5d9423244607dd7abdb4d0eaf2e7c863af87a1bb8b0cd1

Contents?: true

Size: 578 Bytes

Versions: 71

Compression:

Stored size: 578 Bytes

Contents

Factory.factories.values.each do |factory|
  if factory.build_class.respond_to?(:keys)
    factory.build_class.keys.each_key do |key|
      human_column_name = key.downcase.gsub('_', ' ')
      Given /^an? #{factory.human_name} exists with an? #{human_column_name} of "([^"]*)"$/i do |value|
        Factory(factory.factory_name, key => value)
      end

      Given /^(\d+) #{factory.human_name.pluralize} exist with an? #{human_column_name} of "([^"]*)"$/i do |count, value|
        count.to_i.times { Factory(factory.factory_name, key => value) }
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 2 rubygems

Version Path
noodall-form-builder-0.4.2 features/support/mm_factory_steps.rb
noodall-form-builder-0.4.1 features/support/mm_factory_steps.rb
noodall-form-builder-0.4.0 features/support/mm_factory_steps.rb
noodall-ui-0.3.20 features/support/mm_factory_steps.rb
noodall-ui-0.3.19 features/support/mm_factory_steps.rb
noodall-form-builder-0.3.3 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.11 features/support/mm_factory_steps.rb
noodall-form-builder-0.3.2 features/support/mm_factory_steps.rb
noodall-form-builder-0.3.1 features/support/mm_factory_steps.rb
noodall-form-builder-0.3.0 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.10 features/support/mm_factory_steps.rb
noodall-ui-0.4.1 features/support/mm_factory_steps.rb
noodall-ui-0.4.0 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.9 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.8 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.7 features/support/mm_factory_steps.rb
noodall-ui-0.3.17 features/support/mm_factory_steps.rb
noodall-ui-0.3.16 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.5 features/support/mm_factory_steps.rb
noodall-ui-0.3.15 features/support/mm_factory_steps.rb