Module: Utilities

Defined in:
lib/sim/support/cucumber_util.rb

Instance Method Summary collapse

Instance Method Details

#full_title(page_title) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/sim/support/cucumber_util.rb', line 2

def full_title(page_title)
  base_title = "Ruby on Rails Tutorial Sample App"
  if page_title.empty?
    base_title
  else
    "#{base_title} | #{page_title}"
  end
end

#path_to(page_name) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/sim/support/cucumber_util.rb', line 11

def path_to(page_name)
  case page_name
  when /homepage/
    root_path
  else
    raise "Can't find mapping from \"{page_name}\" to a path."
  end
end