Created
June 15, 2012 22:49
-
-
Save ch1ago/2939096 to your computer and use it in GitHub Desktop.
This file contains hidden or 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' | |
describe "Session" do | |
describe "GET /auth/facebook" do | |
it "with capybara: triggers callback and creates Bob Example" do | |
Fabricate(:school) | |
# I'm a guest | |
visit home_index_path | |
current_path.should == home_guest_path | |
-> do | |
-> do | |
# - login (creating user) | |
click_link('login with facebook') | |
current_path.should == home_user_path | |
end.should change { User.count }.by(1) | |
end.should change { Login.count }.by(1) | |
current_path.should == home_user_path | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment