Sha256: 47e58008c31779b1e1d6499d2a2f5f37c0f793b2418cd98017df8e7330444460
Contents?: true
Size: 577 Bytes
Versions: 6
Compression:
Stored size: 577 Bytes
Contents
class ThingsScenario < Scenario::Base def load create_thing "one" create_thing "two" end helpers do def create_thing(attributes = {}) attributes = { :name => attributes } if attributes.kind_of?(String) attributes = thing_params(attributes) create_record(:thing, attributes[:name].strip.gsub(' ', '_').underscore.to_sym, attributes) end def thing_params(attributes = {}) attributes = { :name => "Unnamed Thing", :description => "I'm not sure what this is." }.update(attributes) end end end
Version data entries
6 entries across 6 versions & 1 rubygems