features/support/env.rb in staticpress-0.5.2 vs features/support/env.rb in staticpress-0.6.0
- old
+ new
@@ -1,3 +1,27 @@
-$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../../lib'))
-
require 'aruba/cucumber'
+
+require 'compass'
+require 'debugger'
+require 'haml'
+require 'redcarpet'
+require 'sass'
+
+require_relative '../../lib/staticpress'
+
+module IntegrationHelpers
+ def create_sample_blog(title = 'Transient Thoughts')
+ blog_title = title ? "'#{title}'" : nil
+ run_simple "staticpress new temporary_blog #{blog_title}"
+ cd('temporary_blog')
+ end
+
+ def run_one_of(*commands)
+ run_simple commands.shuffle.first
+ end
+
+ def verify_directory_contains_file(directory, file)
+ check_directory_presence [directory], true
+ check_file_presence ["#{directory}/#{file}"], true
+ end
+end
+World IntegrationHelpers