Commit 9abec44

mo khan <mo@mokhan.ca>
2016-06-02 03:19:43
fix cucumber test and add env for .travis.
1 parent f9fcea7
Changed files (3)
features/step_definitions/registration_steps.rb
@@ -12,6 +12,7 @@ When(/^they enter a (.*), (.*) and (.*)$/) do |username, email, password|
 end
 
 When(/^the username (.*) is already registered$/) do |username|
+  @username = username
   FactoryGirl.create(:user, username: username)
 end
 
@@ -19,8 +20,8 @@ When(/^the email (.*) is already registered$/) do |email|
   FactoryGirl.create(:user, email: email)
 end
 
-Then(/^it redirects them to the dashboard$/) do
-  expect(@subject.current_path).to eql(dashboard_path)
+Then(/^it redirects them to edit their profile$/) do
+  expect(@subject.current_path).to eql(edit_profile_path(@username))
 end
 
 Then(/^it displays the following (.*)$/) do |text|
features/registration.feature
@@ -6,7 +6,7 @@ Feature: Registration
   Scenario Outline: Register a new user
     Given the user is on the registration page
     When they enter a <username>, <email> and <password>
-    Then it redirects them to the dashboard
+    Then it redirects them to edit their profile
 
     Examples:
       | username | email          | password |
.travis.yml
@@ -10,6 +10,10 @@ services:
 env:
   global:
     - secure: QOnNDieI+NdqXYLxqaxjSBDYnmVnH40btrGKub/DAe7Q6xq0JKd7MUE828bwM+Q64UTD2umTGEZgeqXu3bt/pn8RbjRNv/dZLCC5vKogGgZ8YPGal8eUbmccYlYgLY640wHzZift0u3fMYYNCKtNWeL+05rRHdJgO5NBATWgFGHcPLplw8aoHMskcDWR9ZC5LqIjQq7W58a+Qx3xmtBlr3v8+MnBetUv4YL56qjZXi8YcgSs42vAb6YtvyTXTpxnJniacaFmx52xosuJR5wnel6ZZ6ZH5cODp9O5aLF9HYiPRYa2nrSM82khG5yWqO5fVFEhcvJG0uKgkbm/k8535wKSC9s6CBv89ULN3Mz4w8H2nymTkVTinStKrX0Zc8hhJBQOGQwXCJFxlAIQMYmuJiNbPF4Dd58gT+xU9EWkXvnVXhJtUrn39z9A30zAfrSH6s4e8+p9CMYGOUxq+Xmj+vfTCkDE9y2t2D6QYw/IFeTqKYHJMDPYVCp9USZUNx/PjsRpx2974C22Aun3QnYSxfGNnHMcMmadGRK5IuR/ewC+OGt3X8d6FgNlEU0Czi+ratUniEJgoM+qh5InbxCneo5KvHJcFijc3mAt8anRK+Mk2Uw8rS2RBcPR+ursQ7pzVvRED6vLAFe4a0olDInd3ijNt78iLBKzgMVQPLu9dhg=
+    - YELP_CONSUMER_KEY='aaa'
+    - YELP_CONSUMER_SECRET='aaa'
+    - YELP_TOKEN='aaa'
+    - YELP_TOKEN_SECRET='aaa'
   matrix:
     - TEST_SUITE='rake spec'
     - TEST_SUITE='rake teaspoon'