diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index 98ce525b..e29a7cc6 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -643,9 +643,10 @@ module Sinatra self.class.settings end - alias_method :options, :settings - class << self - alias_method :options, :settings + def options + warn "Sinatra::Base#options is deprecated and will be removed, " \ + "use #settings insetad.\n\tfrom #{caller.first}" + settings end # Exit the current block, halts any further processing diff --git a/test/templates_test.rb b/test/templates_test.rb index d5eb0d66..8a64312d 100644 --- a/test/templates_test.rb +++ b/test/templates_test.rb @@ -144,7 +144,7 @@ class TemplatesTest < Test::Unit::TestCase end it 'loads templates from specified views directory' do - render_app { render :test, :hello, :views => options.views + '/foo' } + render_app { render :test, :hello, :views => settings.views + '/foo' } assert_equal "from another views directory\n", body end