Created
January 2, 2013 20:52
-
-
Save ogredude/4437904 to your computer and use it in GitHub Desktop.
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: spec/requests/waitlist_spec.rb | |
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/ericf/.rvm/gems/ruby-1.8.7-p352@destico/gems/guard-rspec-0.5.9/lib/guard/rspec/formatters/notification_rspec.rb", "spec/requests/waitlist_spec.rb"]... | |
http://www.example.com/wait_lists/new in first scenario.. | |
http://www.example.com/wait_lists/new in second scenario. | |
http://www.example.com/wait_lists/new in problem scenarioF | |
Failures: | |
1) New waitlist entry Trying to apply when you're signed in | |
Failure/Error: should_see "You must be logged out" | |
expected there to be content "You must be logged out" in "Example Domain\nThis domain is established to be used for illustrative examples in documents. You do not need to coordinate or ask for permission to use this domain in examples, and it is not available for registration.\nMore information..." | |
# ./spec/support/helpers.rb:48:in `should_see' | |
# ./spec/requests/waitlist_spec.rb:43 | |
Finished in 4969.54 seconds | |
4 examples, 1 failure |
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
require 'spec_helper' | |
feature "New waitlist entry" do | |
background do | |
activate_authlogic | |
reset_mailer | |
end | |
scenario "Applying to be on the wait list" do | |
print "\n" + new_wait_list_url + " in first scenario" | |
visit new_wait_list_url | |
fill_in "waiter_email", :with => "fred@joebob.com" | |
click_button "waitlist_submit" | |
should_see "You are now on the wait list" | |
end | |
scenario "Applying when you've already applied" do | |
waiter = Fabricate(:waiter, :email => "fred@joebob.com") | |
visit new_wait_list_url | |
fill_in "waiter_email", :with => "fred@joebob.com" | |
click_button "waitlist_submit" | |
should_see "there was a problem" | |
end | |
scenario "Applying when you're already signed up" do | |
user = Fabricate(:user) | |
print "\n" + new_wait_list_url + " in second scenario" | |
visit new_wait_list_url | |
fill_in "waiter_email", :with => user.email | |
click_button "waitlist_submit" | |
should_see "there was a problem" | |
end | |
scenario "Trying to apply when you're signed in", :js => true do | |
user = Fabricate(:user) | |
user.activate! | |
print "\n" + new_wait_list_url + " in problem scenario" | |
login(user) | |
visit new_wait_list_url | |
page! | |
should_see "You must be logged out" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment