1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

More tweaks

This commit is contained in:
Thomas Reynolds 2018-01-25 15:41:32 -08:00
parent 0512121088
commit 1f33cfdf3c
4 changed files with 10 additions and 6 deletions

View file

@ -9,7 +9,7 @@ Feature: Run the preview server
And the default aruba timeout is 30 seconds
Scenario: Start the server with defaults
When I run `middleman server` interactively
When I run the interactive middleman server
And I stop middleman if the output contains:
"""
Inspect your site configuration

View file

@ -1,9 +1,7 @@
Feature: Extension author could use some hooks
Scenario: When build
Given a fixture app "extension-hooks-app"
When I run `middleman build`
Then the exit status should be 0
Given a successfully built app at "extension-hooks-app"
And the output should contain "/// after_configuration ///"
And the output should contain "/// ready ///"
And the output should contain "/// before_build ///"

View file

@ -49,3 +49,9 @@ Given /^I run the interactive middleman console$/ do
step %Q{I set the environment variable "MM_ROOT" to "#{cwd}"}
step %Q{I run `middleman console` interactively}
end
Given /^I run the interactive middleman server$/ do
cwd = File.expand_path(aruba.current_directory)
step %Q{I set the environment variable "MM_ROOT" to "#{cwd}"}
step %Q{I run `middleman server` interactively}
end

View file

@ -1,10 +1,10 @@
When /^I stop (?:middleman|all commands) if the output( of the last command)? contains:$/ do |last_command, expected|
begin
Timeout.timeout(exit_timeout) do
Timeout.timeout(aruba.config.exit_timeout) do
loop do
fail "You need to start middleman interactively first." unless @interactive
if unescape(@interactive.output) =~ Regexp.new(unescape(expected))
if sanitize_text(@interactive.output) =~ Regexp.new(sanitize_text(expected))
all_commands.each { |p| p.terminate }
break
end