use aruba for server tests too

This commit is contained in:
Thomas Reynolds 2011-12-31 13:44:50 -08:00
parent aee8e32524
commit 50b9ad7b28
3 changed files with 4 additions and 10 deletions

View file

@ -91,7 +91,6 @@ module Middleman::CoreExtensions::FrontMatter
file = File.expand_path(file, @app.root) file = File.expand_path(file, @app.root)
content = File.read(file) content = File.read(file)
# @app.logger.debug :frontmatter_update, Time.now, file if @app.logging?
result = parse_front_matter(content) result = parse_front_matter(content)
if result if result

View file

@ -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| Then /^the file "([^\"]*)" has the contents$/ do |path, contents|
write_file(path, contents) write_file(path, contents)
step %Q{the file "#{path}" did change} step %Q{the file "#{path}" did change}

View file

@ -22,9 +22,10 @@ Given /^current environment is "([^\"]*)"$/ do |env|
end end
Given /^the Server is running at "([^\"]*)"$/ do |app_path| 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")) if File.exists?(File.join(root_dir, "source"))
ENV["MM_SOURCE"] = "source" ENV["MM_SOURCE"] = "source"
else else
@ -32,7 +33,7 @@ Given /^the Server is running at "([^\"]*)"$/ do |app_path|
end end
initialize_commands = @initialize_commands || [] initialize_commands = @initialize_commands || []
initialize_commands.unshift lambda { initialize_commands.unshift lambda {
set :root, root_dir set :root, root_dir
set :environment, @current_env || :development set :environment, @current_env || :development
set :show_exceptions, false set :show_exceptions, false