1 class ThingsScenario < Scenario::Base
9 def create_thing(attributes = {})
10 attributes = { :name => attributes } if attributes.kind_of?(String)
11 attributes = thing_params(attributes)
12 create_record(:thing, attributes[:name].strip.gsub(' ', '_').underscore.to_sym, attributes)
15 def thing_params(attributes = {})
17 :name => "Unnamed Thing",
18 :description => "I'm not sure what this is."