Sha256: d9611ef00af898eaa267c1426ae9fc7c0b5dc18a62a20b800cf546b71631e4ef

Contents?: true

Size: 614 Bytes

Versions: 12

Compression:

Stored size: 614 Bytes

Contents

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

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

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
noodall-form-builder-0.5.4 features/support/mm_factory_steps.rb
noodall-form-builder-0.5.3 features/support/mm_factory_steps.rb
noodall-form-builder-0.5.2 features/support/mm_factory_steps.rb
noodall-ui-0.4.11 features/support/mm_factory_steps.rb
noodall-ui-0.4.10 features/support/mm_factory_steps.rb
noodall-ui-0.4.9 features/support/mm_factory_steps.rb
noodall-ui-0.4.8 features/support/mm_factory_steps.rb
noodall-form-builder-0.5.0 features/support/mm_factory_steps.rb
noodall-ui-0.4.7 features/support/mm_factory_steps.rb
noodall-ui-0.4.6 features/support/mm_factory_steps.rb
noodall-ui-0.4.5 features/support/mm_factory_steps.rb
noodall-ui-0.4.4 features/support/mm_factory_steps.rb