diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index 405401d5..5766ca5d 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -721,12 +721,6 @@ module Sinatra template name, &block end - def use_in_file_templates!(file=nil) - warn "use_in_file_templates! is deprecated; " \ - "use enable :inline_templates instead" - set :inline_templates, file - end - # Load embeded templates from the file; uses the caller's __FILE__ # when no file is specified. def inline_templates=(file=nil) diff --git a/test/templates_test.rb b/test/templates_test.rb index 2f8d4e50..98560705 100644 --- a/test/templates_test.rb +++ b/test/templates_test.rb @@ -76,9 +76,9 @@ class TemplatesTest < Test::Unit::TestCase assert_equal "Layout 3!\nHello World!\n", body end - it 'loads templates from source file with use_in_file_templates!' do + it 'loads templates from source file with inline_templates enabled' do mock_app { - use_in_file_templates! + enable :inline_templates } assert_equal "this is foo\n\n", @app.templates[:foo][0] assert_equal "X\n= yield\nX\n", @app.templates[:layout][0] @@ -93,7 +93,7 @@ class TemplatesTest < Test::Unit::TestCase test 'use_in_file_templates simply ignores IO errors' do assert_nothing_raised { mock_app { - use_in_file_templates!('/foo/bar') + set :inline_templates, '/foo/bar' } }