Permalink
Browse files

Remove EOL whitespace

  • Loading branch information...
1 parent e459f54 commit 2aad92b90ecaabde331b4ffc24d68bd7d8bcbec5 @sferik sferik committed May 7, 2011
Showing with 8 additions and 8 deletions.
  1. +5 −5 spec/controllers/sessions_controller_spec.rb
  2. +3 −3 spec/support/twitter_stubs.rb
@@ -10,13 +10,13 @@
it "should redirect to twitter authorization url" do
get :create
-
+
session['request_token'].should == 't'
session['request_secret'].should == 's'
response.location.should =~ /api.twitter.com/
end
end
-
+
describe "/callback" do
before do
stub_oauth_access_token!
@@ -25,18 +25,18 @@
it "should authenticate with twitter" do
get :callback, :oauth_verifier => 'some_key'
-
+
session['access_token'].should == 'at'
session['access_secret'].should == 'as'
session[:screen_name].should == 'felipeelias'
response.should be_redirect
end
end
-
+
describe "/destroy" do
it "should logout and destroy all sessions" do
delete :destroy, :id => "id"
-
+
['access_token', 'access_secret', :screen_name].each do |sess|
session[sess].should be_nil
end
@@ -2,15 +2,15 @@ module TwitterStubs
def fixture(name)
File.new("#{Rails.root}/spec/fixtures/#{name}.json")
end
-
+
def stub_oauth_request_token!
stub_request(:post, "http://api.twitter.com/oauth/request_token").to_return(:body => "oauth_token=t&oauth_token_secret=s")
end
-
+
def stub_oauth_access_token!
stub_request(:post, "http://api.twitter.com/oauth/access_token").to_return(:body => "oauth_token=at&oauth_token_secret=as")
end
-
+
def stub_verify_credentials!
stub_request(:get, "https://api.twitter.com/1/account/verify_credentials.json").to_return(:body => fixture("verify_credentials"))
end

0 comments on commit 2aad92b

Please sign in to comment.