Skip to content

Instantly share code, notes, and snippets.

@yukas
Last active May 31, 2017 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukas/c418f16a794dcec7f57ff829c9a1bb04 to your computer and use it in GitHub Desktop.
Save yukas/c418f16a794dcec7f57ff829c9a1bb04 to your computer and use it in GitHub Desktop.
Obeying the "Single Method of Abstraction" rule
class AddAttendeePage
def add_attendee_with_details
fill_attendee_details
fill_order_form
click_add_attendee
end
private
def fill_attendee_details
fill_in('user_email', with: 'test@gmail.com')
fill_in('user_first_name', with: 'test')
fill_in('user_last_name', with: 'test')
end
def fill_order_form
# ...
end
def click_add_attendee
# ...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment