Sha256: 46e7601da021ad099bdad3c41c11071345cd56d5be47645beefbdf90804f80c7
Contents?: true
Size: 812 Bytes
Versions: 7
Compression:
Stored size: 812 Bytes
Contents
require 'test_helper.rb' # # TestClass for ApplicationRouter # # @author [benny] # class ApplicationTest < MiniTest::Unit::TestCase include Rack::Test::Methods # # MockClass for Testing # # @author [benny] # class MockApp def call(env = nil) [200, {}, ['hello']] end end def app Rack::Blogengine::Application.new end def setup @cli = Rack::Blogengine::CommandLineInterface capture_stdout { @cli.generate(testpath) } Rack::Blogengine.config = @cli.send(:get_config, testpath) Rack::Blogengine.documents = Rack::Blogengine::DocumentParser.parse_in_documents(testpath) end def test_application_is_callable get '/' assert(last_response.body.include?('This is the Index Page')) end def teardown system("rm -rf #{testpath}") end end
Version data entries
7 entries across 7 versions & 1 rubygems