Just some typos, here and there!

This commit is contained in:
Vipul A M 2013-03-14 23:50:51 +05:30
parent 54d6ba06cc
commit 4fa3d9acb0
10 changed files with 13 additions and 13 deletions

View File

@ -1224,7 +1224,7 @@ module Sinatra
template name, &block
end
# Load embeded templates from the file; uses the caller's __FILE__
# Load embedded templates from the file; uses the caller's __FILE__
# when no file is specified.
def inline_templates=(file = nil)
file = (file.nil? || file == true) ? (caller_files.first || File.expand_path($0)) : file

View File

@ -67,7 +67,7 @@ class BaseTest < Test::Unit::TestCase
assert_equal Sinatra::Base.settings, Sinatra::Base.new.settings
end
it 'expses helpers' do
it 'exposes helpers' do
assert_equal 'image/jpeg', Sinatra::Base.new.helpers.mime_type(:jpg)
end
end

View File

@ -86,7 +86,7 @@ class ERBTest < Test::Unit::TestCase
assert_equal '<outer><inner>hi</inner></outer>', body
end
it "can rendere truly nested layouts by accepting a layout and a block with the contents" do
it "can render truly nested layouts by accepting a layout and a block with the contents" do
mock_app do
template(:main_outer_layout) { "<h1>Title</h1>\n<%= yield %>" }
template(:an_inner_layout) { "<h2>Subtitle</h2>\n<%= yield %>" }

View File

@ -288,7 +288,7 @@ class AfterFilterTest < Test::Unit::TestCase
assert ran_filter
end
it 'changes to path_info from a pattern matching before filter are respoected when routing' do
it 'changes to path_info from a pattern matching before filter are respected when routing' do
mock_app do
before('/foo') { request.path_info = '/bar' }
get('/bar') { 'blah' }

View File

@ -85,7 +85,7 @@ class HAMLTest < Test::Unit::TestCase
assert_equal "bar\n", body
end
it "can rendere truly nested layouts by accepting a layout and a block with the contents" do
it "can render truly nested layouts by accepting a layout and a block with the contents" do
mock_app do
template(:main_outer_layout) { "%h1 Title\n= yield" }
template(:an_inner_layout) { "%h2 Subtitle\n= yield" }

View File

@ -118,7 +118,7 @@ class HelpersTest < Test::Unit::TestCase
end
describe 'body' do
it 'takes a block for defered body generation' do
it 'takes a block for deferred body generation' do
mock_app do
get('/') { body { 'Hello World' } }
end
@ -798,7 +798,7 @@ class HelpersTest < Test::Unit::TestCase
assert_equal 'text/plain;charset=utf-8', response['Content-Type']
end
it 'sets the Content-Type response header if type option is set to a file extesion' do
it 'sets the Content-Type response header if type option is set to a file extension' do
send_file_app :type => 'html'
get '/file.txt'
assert_equal 'text/html;charset=utf-8', response['Content-Type']
@ -822,7 +822,7 @@ class HelpersTest < Test::Unit::TestCase
assert_equal File.mtime(@file).httpdate, response['Last-Modified']
end
it 'allows passing in a differen Last-Modified response header with :last_modified' do
it 'allows passing in a different Last-Modified response header with :last_modified' do
time = Time.now
send_file_app :last_modified => time
get '/file.txt'
@ -873,7 +873,7 @@ class HelpersTest < Test::Unit::TestCase
assert_status 201
end
it "is able to send files with unkown mime type" do
it "is able to send files with unknown mime type" do
@file = File.dirname(__FILE__) + '/file.foobar'
File.open(@file, 'wb') { |io| io.write('Hello World') }
send_file_app

View File

@ -176,7 +176,7 @@ module IntegrationHelper
Thread.new do
# Hack to ensure that Kernel#caller has the same info as
# when run from command-line, for Sintra::Application.app_file.
# when run from command-line, for Sinatra::Application.app_file.
# Also, line numbers are zero-based in JRuby's parser
vm.provider.runtime.current_context.set_file_and_line(app_file, 0)
# Run the app

View File

@ -78,7 +78,7 @@ class SlimTest < Test::Unit::TestCase
assert_body '<x foo="bar"></x>'
end
it "can rendere truly nested layouts by accepting a layout and a block with the contents" do
it "can render truly nested layouts by accepting a layout and a block with the contents" do
mock_app do
template(:main_outer_layout) { "h1 Title\n== yield" }
template(:an_inner_layout) { "h2 Subtitle\n== yield" }

View File

@ -281,7 +281,7 @@ class TemplatesTest < Test::Unit::TestCase
assert_equal 'template in subclass', body
end
it "is possible to use a different engine for the layout than for the template itself explicitely" do
it "is possible to use a different engine for the layout than for the template itself explicitly" do
render_app do
settings.template(:layout) { 'Hello <%= yield %>!' }
render :str, "<%= 'World' %>", :layout_engine => :erb

View File

@ -63,7 +63,7 @@ class WLangTest < Test::Unit::TestCase
assert_body "WLang Layout!\nHello World"
end
it "can rendere truly nested layouts by accepting a layout and a block with the contents" do
it "can rendered truly nested layouts by accepting a layout and a block with the contents" do
mock_app do
template(:main_outer_layout) { "<h1>Title</h1>\n>{ yield }" }
template(:an_inner_layout) { "<h2>Subtitle</h2>\n>{ yield }" }