Class: Test::Unit::TestCase

Inherits:
Object
  • Object
show all
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

Constant Summary

Constants included from Rack::Test::Methods

Rack::Test::Methods::METHODS

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#appObject (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