Permalink
Browse files

Merge pull request #81 from kytrinyx/clean-up-whitespace

Clean up trailing whitespace
  • Loading branch information...
2 parents 9fa50de + 87094e7 commit d0b30fb5e901be1d07657e50fcb09626660fa2ec @TrevorBramble TrevorBramble committed Jan 1, 2013
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/sinatra/namespace.rb
  2. +3 −3 spec/content_for_spec.rb
  3. +3 −3 spec/namespace_spec.rb
View
2 lib/sinatra/namespace.rb
@@ -183,7 +183,7 @@ def errors
def namespace_errors
@errors
end
-
+
def error(*codes, &block)
args = Sinatra::Base.send(:compile!, "ERROR", /^#{@pattern}/, block)
codes = codes.map { |c| Array(c) }.flatten
View
6 spec/content_for_spec.rb
@@ -138,13 +138,13 @@ def render(engine, template)
render(inner, :passes_values).should == "<i>1</i>2"
end
end
-
+
describe "with content_for? in Ruby" do
- it 'renders block if key is set' do
+ it 'renders block if key is set' do
content_for(:foo) { "foot" }
render(inner, :footer).should == "foot"
end
-
+
it 'does not render a block if different key' do
content_for(:different_key) { "foot" }
render(inner, :footer).should be_empty
View
6 spec/namespace_spec.rb
@@ -54,7 +54,7 @@ def namespace(*args, &block)
send(verb, "/fox/bar").should be_ok
body.should == "fox" unless verb == :head
end
-
+
it "sets params correctly from route" do
namespace("/foo") { send(verb, "/:bar") { params[:bar] }}
send(verb, "/foo/bar").should be_ok
@@ -89,7 +89,7 @@ def namespace(*args, &block)
it 'allows defining routes without a pattern' do
namespace(%r{/foo}) { send(verb) { 'bar' } }
send(verb, '/foo').should be_ok
- body.should == 'bar' unless verb == :head
+ body.should == 'bar' unless verb == :head
end
end
@@ -509,7 +509,7 @@ def magic
mock_app {
class AError < StandardError; end
class BError < AError; end
-
+
error(AError) { body('auth failed'); 401}
namespace('/en') do
get '/foo' do

0 comments on commit d0b30fb

Please sign in to comment.