Sha256: fd0e07a778995c2c497165f83022a7131db5ade02e339abe89053c2b0b17b4aa
Contents?: true
Size: 816 Bytes
Versions: 3
Compression:
Stored size: 816 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.new 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
3 entries across 3 versions & 1 rubygems