Sha256: 9d33c6e5cd324ac321ded899a6849a4b02acccf055f5696d692b77cc3fb93b6f

Contents?: true

Size: 700 Bytes

Versions: 25

Compression:

Stored size: 700 Bytes

Contents

require 'factory_girl_rails'
require 'faker'
require 'factory_girl/step_definitions'

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

25 entries across 25 versions & 1 rubygems

Version Path
noodall-ui-0.5.15 features/support/mm_factory_steps.rb
noodall-ui-0.5.14 features/support/mm_factory_steps.rb
noodall-ui-0.5.13 features/support/mm_factory_steps.rb
noodall-ui-0.5.12 features/support/mm_factory_steps.rb
noodall-ui-0.5.11 features/support/mm_factory_steps.rb
noodall-ui-0.5.10 features/support/mm_factory_steps.rb
noodall-ui-0.5.9 features/support/mm_factory_steps.rb
noodall-ui-0.5.8 features/support/mm_factory_steps.rb
noodall-ui-0.5.7 features/support/mm_factory_steps.rb
noodall-ui-0.5.6 features/support/mm_factory_steps.rb
noodall-ui-0.5.5 features/support/mm_factory_steps.rb
noodall-ui-0.5.4 features/support/mm_factory_steps.rb
noodall-ui-0.5.3 features/support/mm_factory_steps.rb
noodall-ui-0.5.2 features/support/mm_factory_steps.rb
noodall-ui-0.5.1 features/support/mm_factory_steps.rb
noodall-ui-0.5.0 features/support/mm_factory_steps.rb
noodall-ui-0.5.0.pre.10 features/support/mm_factory_steps.rb
noodall-ui-0.5.0.pre.9 features/support/mm_factory_steps.rb
noodall-ui-0.5.0.pre.8 features/support/mm_factory_steps.rb
noodall-ui-0.5.0.pre.7 features/support/mm_factory_steps.rb