test/unit/sinatra_app_tests.rb in deas-0.1.0 vs test/unit/sinatra_app_tests.rb in deas-0.2.0

- old
+ new

@@ -40,22 +40,23 @@ should "call constantize! on all routes" do assert_equal TestViewHandler, @route.handler_class end should "have it's configuration set based on the server configuration" do - subject.settings do |settings| - assert_equal 'staging', settings.env - assert_equal 'path/to/somewhere', settings.root + subject.settings.tap do |settings| + assert_equal 'staging', settings.environment + assert_equal 'path/to/somewhere', settings.root.to_s assert_equal @configuration.app_file, settings.app_file - assert_equal 'path/to/somewhere/public', settings.public_folder - assert_equal 'path/to/somewhere/views', settings.views + assert_equal 'path/to/somewhere/public', settings.public_folder.to_s + assert_equal 'path/to/somewhere/views', settings.views.to_s assert_equal true, settings.dump_errors assert_equal false, settings.logging assert_equal false, settings.method_override assert_equal false, settings.sessions assert_equal true, settings.show_exceptions - assert_equal true, settings.static_files - assert_equal @configuration.logger, settings.deas_logger + assert_equal true, settings.static + assert_instance_of Deas::RunnerLogger, settings.runner_logger + assert_instance_of Deas::NullLogger, settings.logger end end should "define Sinatra routes for every route in the configuration" do get_routes = subject.routes[@route.method.to_s.upcase] || []