29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/generators/saucy/features/features_generator.rb', line 29
def create_paths
paths = " when 'the admin page'\nadmin_path\n when 'the list of accounts'\naccounts_path\n when 'the list of plans page'\nplans_path\n when /^the memberships page for the \"([^\"]+)\" account$/\naccount = Account.find_by_name!($1)\naccount_memberships_path(account)\n when /^the projects page for the \"([^\"]+)\" account$/\naccount = Account.find_by_name!($1)\naccount_projects_path(account)\n when /settings page for the \"([^\"]+)\" account$/i\naccount = Account.find_by_name!($1)\nedit_account_path(account)\n when /settings page$/\nedit_profile_path\n when /dashboard page$/\naccounts_path\n when /sign up page for the \"([^\"]+)\" plan$/i\nplan = Plan.find_by_name!($1)\nnew_plan_account_path(plan)\n when /^the billing page for the \"([^\"]+)\" account$/\naccount = Account.find_by_name!($1)\naccount_billing_path(account)\n when /^the upgrade plan page for the \"([^\"]+)\" account$/\naccount = Account.find_by_name!($1)\nedit_account_plan_path(account)\n when /^the new project page for the newest account by \"([^\"]*)\"$/\nuser = User.find_by_email!($1)\naccount = user.accounts.order(\"id desc\").first\nnew_account_project_path(account)\n when /^the \"([^\"]*)\" project page$/\nproject = Project.find_by_name!($1)\naccount_project_path(project.account, project)\n when /^the new project page for the \"([^\"]+)\" account$/\naccount = Account.find_by_name!($1)\nnew_account_project_path(account)\n\n\n PATHS\n\n replace_in_file \"features/support/paths.rb\",\n \"case page_name\",\n \"case page_name\\n\#{paths}\"\nend\n"
|