April 8, 2013
Feature: Sign up
As an unauthorized user
I want to signup with my details
So that I can login
Scenario: Password doesn’t match confirmation
Given I am on the signup page
When I fill in all user details
Then I should see a success flash notice
And now in step_definitions folder i am writing a sign_up.rb
Given(/^I am on the signup page$/) do
visit “/user/new”
When(/^I fill in all user details$/) do
fill_in “user_email”, :with => “good@example.com”
fill_in “user_password”, :with => “good123”
fill_in “user_password_confirmation”, :with => “good123”
fill_in “user_city”, :with => “pune”
fill_in “user_weight”, :with => “82”
fill_in “user_height”, :with => “5.6”
fill_in “user_last_name”, :with => “pathak”
fill_in “user_first_name”, :with => “kedar”
click_button “Create User”
Then(/^I should see a success flash notice$/) do page.html.should match(/Sing Up successfully. Pending for approval/i)
Leave a Reply
You must be logged in to post a comment.