BDD with PageObject

Extract the step of opening site into a method

Let's extract the @driver.get site into a method openSite in "buy_book.rb". An it should look like:

Given /^I open "(.*?)"$/ do |site|
    openSite (site)
end

def openSite (site) @driver.get site end

alt text