1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
sinatra/sinatra-contrib/spec/extension_spec.rb
Ashley Williams 60dd845326 fix specs to account for deprecation notices
- use `be true` instead of `be_true`
- use `be false` instead of `be_false`
2015-05-15 14:59:42 -04:00

32 lines
652 B
Ruby

require 'spec_helper'
describe Sinatra::Extension do
module ExampleExtension
extend Sinatra::Extension
set :foo, :bar
settings.set :bar, :blah
configure :test, :production do
set :reload_stuff, false
end
configure :development do
set :reload_stuff, true
end
get '/' do
"from extension, yay"
end
end
before { mock_app { register ExampleExtension }}
it('allows using set') { settings.foo.should == :bar }
it('implements configure') { settings.reload_stuff.should be false }
it 'allows defing routes' do
get('/').should be_ok
body.should == "from extension, yay"
end
end