Sha256: 4efc2b275f56e0a45f36c2c0f24a2653186bc64ea90b6e454691ab7e9244fd4b
Contents?: true
Size: 654 Bytes
Versions: 102
Compression:
Stored size: 654 Bytes
Contents
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/ '/' when /the new user page/ '/users/new' else begin page_name =~ /the (.*) page/ path_components = $1.split(/\s+/) self.send(path_components.push('path').join('_').to_sym) rescue Object => e 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
102 entries across 100 versions & 12 rubygems
Version | Path |
---|---|
paperclip-2.5.1 | features/support/paths.rb |
paperclip-2.5.0 | features/support/paths.rb |