diff --git a/middleman-cli/lib/middleman-cli/console.rb b/middleman-cli/lib/middleman-cli/console.rb index 79bf2cfe..3200cb6b 100644 --- a/middleman-cli/lib/middleman-cli/console.rb +++ b/middleman-cli/lib/middleman-cli/console.rb @@ -29,7 +29,7 @@ module Middleman::Cli debug: options['verbose'] } - @app = ::Middleman::Application.server.inst do + @app = ::Middleman::Application.new do config[:environment] = opts[:environment].to_sym if opts[:environment] ::Middleman::Logger.singleton(opts[:debug] ? 0 : 1, opts[:instrumenting] || false) diff --git a/middleman-core/features/console.feature b/middleman-core/features/console.feature new file mode 100644 index 00000000..c3400e3b --- /dev/null +++ b/middleman-core/features/console.feature @@ -0,0 +1,10 @@ +Feature: Console + + Scenario: Enter and exit the console + Given I run `middleman console` interactively + When I type "puts 'Hello from the console.'" + And I type "exit" + Then it should pass with: + """ + Hello from the console. + """