Class: Test::Unit::TestCase
- Inherits:
-
Object
- Object
- Test::Unit::TestCase
- Includes:
- Rack::Test::Methods, Sinatra::Test
- Defined in:
- vendor/sinatra-content-for/test/content_for_test.rb,
vendor/sinatra-markaby/test/test_helper.rb,
vendor/sinatra-maruku/test/test_helper.rb
Direct Known Subclasses
Constant Summary
Constants included from Rack::Test::Methods
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
-
#mock_app(base = Sinatra::Base, &block) ⇒ Object
Sets up a Sinatra::Base subclass defined with the block given.
Methods included from Rack::Test::Methods
#_current_session_names, #build_rack_mock_session, #build_rack_test_session, #current_session, #rack_mock_session, #rack_test_session, #with_session
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
11 12 13 |
# File 'vendor/sinatra-markaby/test/test_helper.rb', line 11 def app @app end |
Instance Method Details
#mock_app(base = Sinatra::Base, &block) ⇒ Object
Sets up a Sinatra::Base subclass defined with the block given. Used in setup or individual spec methods to establish the application.
16 17 18 |
# File 'vendor/sinatra-markaby/test/test_helper.rb', line 16 def mock_app(base=Sinatra::Base, &block) @app = Sinatra.new(base, &block) end |