From 50b9ad7b28cbf0fd39f16375aad71050a54daf61 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sat, 31 Dec 2011 13:44:50 -0800 Subject: [PATCH] use aruba for server tests too --- .../lib/middleman-core/core_extensions/front_matter.rb | 1 - .../lib/middleman-core/step_definitions/middleman_steps.rb | 6 ------ .../lib/middleman-core/step_definitions/server_steps.rb | 7 ++++--- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index 041f8eeb..832a3289 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -91,7 +91,6 @@ module Middleman::CoreExtensions::FrontMatter file = File.expand_path(file, @app.root) content = File.read(file) - # @app.logger.debug :frontmatter_update, Time.now, file if @app.logging? result = parse_front_matter(content) if result diff --git a/middleman-core/lib/middleman-core/step_definitions/middleman_steps.rb b/middleman-core/lib/middleman-core/step_definitions/middleman_steps.rb index 39f7f702..04b373c6 100644 --- a/middleman-core/lib/middleman-core/step_definitions/middleman_steps.rb +++ b/middleman-core/lib/middleman-core/step_definitions/middleman_steps.rb @@ -1,9 +1,3 @@ -require "fileutils" - -Given /^a project at "([^\"]*)"$/ do |dirname| - @target = File.join(PROJECT_ROOT_PATH, "fixtures", dirname) -end - Then /^the file "([^\"]*)" has the contents$/ do |path, contents| write_file(path, contents) step %Q{the file "#{path}" did change} diff --git a/middleman-core/lib/middleman-core/step_definitions/server_steps.rb b/middleman-core/lib/middleman-core/step_definitions/server_steps.rb index acd05092..3f53867e 100644 --- a/middleman-core/lib/middleman-core/step_definitions/server_steps.rb +++ b/middleman-core/lib/middleman-core/step_definitions/server_steps.rb @@ -22,9 +22,10 @@ Given /^current environment is "([^\"]*)"$/ do |env| end Given /^the Server is running at "([^\"]*)"$/ do |app_path| - step %Q{a project at "#{app_path}"} + step %Q{a fixture app "#{app_path}"} + + root_dir = File.expand_path(current_dir) - root_dir = File.join(PROJECT_ROOT_PATH, "fixtures", app_path) if File.exists?(File.join(root_dir, "source")) ENV["MM_SOURCE"] = "source" else @@ -32,7 +33,7 @@ Given /^the Server is running at "([^\"]*)"$/ do |app_path| end initialize_commands = @initialize_commands || [] - initialize_commands.unshift lambda { + initialize_commands.unshift lambda { set :root, root_dir set :environment, @current_env || :development set :show_exceptions, false