Sha256: b8f958132320bc1c98e429ce419d7a2ad1f044e40841752536be70e066c9da3f
Contents?: true
Size: 700 Bytes
Versions: 50
Compression:
Stored size: 700 Bytes
Contents
# Put this into features/support and require it in your env.rb # module NavigationHelpers # Maps a name to a path. Used by the # # When /^I go to (.+)$/ do |page_name| # # step definition in web_steps.rb # def path_to(page_name) case page_name when /^the home\s?page$/ root_path else begin page_name =~ /^the (.*) page$/ path_components = $1.split(/\s+/) self.send(path_components.push('path').join('_').to_sym) rescue NoMethodError, ArgumentError raise "Can't find mapping from \"#{page_name}\" to a path.\n" + "Now, go and add a mapping in #{__FILE__}" end end end end World(NavigationHelpers)
Version data entries
50 entries across 50 versions & 1 rubygems