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