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-ui-0.3.14 features/support/mm_factory_steps.rb
noodall-ui-0.3.13 features/support/mm_factory_steps.rb
noodall-ui-0.3.12 features/support/mm_factory_steps.rb
noodall-ui-0.3.11 features/support/mm_factory_steps.rb
noodall-ui-0.3.8 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.4 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.3 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.2 features/support/mm_factory_steps.rb
noodall-ui-0.3.7 features/support/mm_factory_steps.rb
noodall-ui-0.3.6 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.1 features/support/mm_factory_steps.rb
noodall-form-builder-0.2.0 features/support/mm_factory_steps.rb
noodall-ui-0.3.5 features/support/mm_factory_steps.rb
noodall-ui-0.3.4 features/support/mm_factory_steps.rb
noodall-ui-0.3.3 features/support/mm_factory_steps.rb
noodall-ui-0.3.2 features/support/mm_factory_steps.rb
noodall-form-builder-0.1.3 features/support/mm_factory_steps.rb
noodall-ui-0.3.1 features/support/mm_factory_steps.rb
noodall-ui-0.3.0 features/support/mm_factory_steps.rb
noodall-form-builder-0.1.2 features/support/mm_factory_steps.rb