add cucumber for integration testing and add a feature for statistics

refactor some stuff to support testing statistisc
This commit is contained in:
Reinier Balt 2009-04-13 22:26:20 +02:00
parent 058079a0a7
commit 43440eaf33
11 changed files with 286 additions and 5 deletions

22
features/support/paths.rb Normal file
View file

@ -0,0 +1,22 @@
module NavigationHelpers
def path_to(page_name)
case page_name
when /the homepage/
root_path
when /the statistics page/
stats_path
# Add more page name => path mappings here
else
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"Now, go and add a mapping in features/support/paths.rb"
end
end
end
World do |world|
world.extend NavigationHelpers
world
end