1 class PeopleScenario < Scenario::Base
4 create_person "John Long"
5 create_person "Adam Williams"
9 def create_person(attributes = {})
10 if attributes.kind_of?(String)
11 first, last = attributes.split(/\s+/)
12 attributes = { :first_name => first, :last_name => last }
14 attributes = person_params(attributes)
15 create_record(:person, attributes[:first_name].strip.gsub(' ', '_').underscore.to_sym, attributes)
18 def person_params(attributes = {})
20 :first_name => "John",