mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
deprecate Sinatra::Base#options
This commit is contained in:
parent
728a66f793
commit
6c74338faf
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue