Permalink
Browse files

Clean up trailing whitespace

  • Loading branch information...
1 parent 204713d commit 73d9ef26d36383691a808dcc94c2f3064e1b6215 @kytrinyx kytrinyx committed Dec 9, 2012
Showing with 9 additions and 9 deletions.
  1. +1 −1 lib/sinatra/namespace.rb
  2. +2 −2 spec/capture_spec.rb
  3. +3 −3 spec/content_for_spec.rb
  4. +3 −3 spec/namespace_spec.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
@@ -61,13 +61,13 @@ def render(engine, template)
Hello <%= a.strip %>
@@ simple_slim
-| Say
+| Say
- a = capture do
| World
| Hello #{a.strip}!
@@ nested_slim
-| Say
+| Say
- a = capture do
- b = capture do
| World
@@ -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
@@ -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 73d9ef2

Please sign in to comment.