Skip to content

Commit

Permalink
Fix: Ruby 1.8.7 complains with warning: don't put space before argume…
Browse files Browse the repository at this point in the history
…nt parentheses.
  • Loading branch information
dblock committed Jul 9, 2012
1 parent fb69fb8 commit 2574a89
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spec/grape/endpoint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ def app; subject end
end
end

describe "#redirect" do
it "should redirect to a url with status 302" do
subject.get('/hey') do
describe "#redirect" do
it "should redirect to a url with status 302" do
subject.get('/hey') do
redirect "/ha"
end
get '/hey'
Expand All @@ -255,16 +255,16 @@ def app; subject end
end

it "should have status code 303 if it is not get request and it is http 1.1" do
subject.post('/hey') do
subject.post('/hey') do
redirect "/ha"
end
post '/hey', {}, 'HTTP_VERSION' => 'HTTP/1.1'
last_response.status.should eq 303
last_response.headers['Location'].should eq "/ha"
end

it "support permanent redirect" do
subject.get('/hey') do
it "support permanent redirect" do
subject.get('/hey') do
redirect "/ha", :permanent => true
end
get '/hey'
Expand Down Expand Up @@ -409,7 +409,7 @@ def memoized
verb
end
send(verb, '/example/and/some/more')
last_response.status.should eql (verb == "post" ? 201 : 200)
last_response.status.should eql verb == "post" ? 201 : 200
last_response.body.should eql verb == 'head' ? '' : verb
end
end
Expand Down

0 comments on commit 2574a89

Please sign in to comment.