mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Clean up trailing whitespace
This commit is contained in:
parent
29c28f2af5
commit
f703b7b488
4 changed files with 9 additions and 9 deletions
|
@ -183,7 +183,7 @@ module Sinatra
|
|||
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 @@ Say
|
|||
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 @@ describe Sinatra::ContentFor do
|
|||
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 @@ describe Sinatra::Namespace do
|
|||
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 @@ describe Sinatra::Namespace do
|
|||
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 @@ describe Sinatra::Namespace do
|
|||
mock_app {
|
||||
class AError < StandardError; end
|
||||
class BError < AError; end
|
||||
|
||||
|
||||
error(AError) { body('auth failed'); 401}
|
||||
namespace('/en') do
|
||||
get '/foo' do
|
||||
|
|
Loading…
Reference in a new issue