Merge pull request #1371 from AndrewKvalheim/console

Add a basic feature test for the console.
This commit is contained in:
Thomas Reynolds 2014-09-10 18:27:27 -07:00
commit e4090760e8
2 changed files with 11 additions and 1 deletions

View file

@ -29,7 +29,7 @@ module Middleman::Cli
debug: options['verbose'] debug: options['verbose']
} }
@app = ::Middleman::Application.server.inst do @app = ::Middleman::Application.new do
config[:environment] = opts[:environment].to_sym if opts[:environment] config[:environment] = opts[:environment].to_sym if opts[:environment]
::Middleman::Logger.singleton(opts[:debug] ? 0 : 1, opts[:instrumenting] || false) ::Middleman::Logger.singleton(opts[:debug] ? 0 : 1, opts[:instrumenting] || false)

View file

@ -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.
"""