From 00b4ac68671824d7a52b93ddeaf1e713668d5215 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 10 Sep 2014 15:52:05 -0700 Subject: [PATCH 1/2] Add a basic feature test for the console. --- middleman-core/features/console.feature | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 middleman-core/features/console.feature 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. + """ From ba6ca5b3b7d50d96bd0ee3c763e43a09f005ecfd Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 10 Sep 2014 16:00:07 -0700 Subject: [PATCH 2/2] Fix bug with starting the console. --- middleman-cli/lib/middleman-cli/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)