Created
April 12, 2012 22:16
-
-
Save partydrone/2371405 to your computer and use it in GitHub Desktop.
Test Active Directory authentication through adauth gem with Cucumber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Authentication | |
Employees should be able to access the applicaiton using their existing network login account. | |
Scenario: Sign In | |
Given a valid user | |
When I am on the sign in page | |
And I fill in "username" with "brubble" | |
And I fill in "password" with "secret" | |
And I click "Sign in" | |
Then I should see "Signed in as: Barney Rubble" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running Cucumber features: bundle exec cucumber --no-profile --color --format progress --strict --require /Users/aporter/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/guard-cucumber-0.7.5/lib/guard/cucumber/notification_formatter.rb --format Guard::Cucumber::NotificationFormatter --out /dev/null --require features features/authentication.feature | |
Disabling profiles... | |
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern instead. (called from <top (required)> at /Users/aporter/Developer/com/wavetronix/repay/config/environment.rb:5) | |
.....F | |
(::) failed steps (::) | |
expected there to be content "Signed in as: Barney Rubble" in "Employee Reimbursement Program - Sign in\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\t\t\n\n\t\n\t\tEmployee Reimbursement Program\n\t\t\n\t\t\t\n\t\t\t\n\t\t\tKeep me signed in on this computer\n\t\t\t\n\t\n\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t" (RSpec::Expectations::ExpectationNotMetError) | |
./features/step_definitions/user_steps.rb:7:in `/^I should see "([^"]*)"$/' | |
features/authentication.feature:10:in `Then I should see "Signed in as: Barney Rubble"' | |
Failing Scenarios: | |
cucumber features/authentication.feature:4 # Scenario: Sign In | |
1 scenario (1 failed) | |
6 steps (1 failed, 5 passed) | |
0m0.296s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given /^a valid user$/ do | |
Allowance.create!({year: "2012", amount: 250}) | |
@user = User.create!({login: "brubble", first_name: "Barney", last_name: "Rubble", email: "[email protected]"}) | |
end | |
Then /^I should see "([^"]*)"$/ do |arg1| | |
should have_content(arg1) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When /^I click "([^"]*)"$/ do |arg1| | |
click_on arg1 | |
end | |
When /^I fill in "([^"]*)" with "([^"]*)"$/ do |arg1, arg2| | |
fill_in arg1, with: arg2 | |
end | |
When /^I am on the sign in page$/ do | |
visit sign_in_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment