Single level of abstraction
Each method should be written on a single level of abstraction. The term best be described using this example:
The add_attendee_with_details method here brakes the rule.
The fill_in(‘order_user_email’, :with => ‘test@gmail.com’) part is more detailed than the fill_order_form part, so the code inside the add_attendee_with_details written on a different level of abstraction.
Now consider this piece of code:
We introduced additional method fill_attendee_details which hides the details of filling the attendee information thus has a higher level of abstraction, the same as other method calls inside add_attendee_with_details.
Code written using this rule a lot easier to read and understand. I suggest everyone to use it.