Sha256: b5da7692540fcb8dbda3e7196e19149dd5cd0910389c6f5cfc2d2ff6ddf28a2c

Contents?: true

Size: 853 Bytes

Versions: 3

Compression:

Stored size: 853 Bytes

Contents

Given /^the textile Server is running$/ do
  root_dir = File.expand_path(expand_path("."))

  ENV['MM_SOURCE'] = '../../../source'
  ENV['MM_DATA_DIR'] = '../../../data'

  ENV['MM_ROOT'] = root_dir

  initialize_commands = @initialize_commands || []
  activation_commands = @activation_commands || []

  @server_inst = ::Middleman::Application.new do
    config[:watcher_disable] = true
    config[:show_exceptions] = false

    initialize_commands.each do |p|
      instance_exec(&p)
    end

    app.after_configuration_eval do
      activation_commands.each do |p|
        config_context.instance_exec(&p)
      end
    end
  end

  Capybara.app = ::Middleman::Rack.new(@server_inst).to_app
end

Given /^the textile Server is running at "([^\"]*)"$/ do |app_path|
  step %Q{a fixture app "#{app_path}"}
  step %Q{the textile Server is running}
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
textile_manual-0.0.4 features/support/server_steps.rb
textile_manual-0.0.3 features/support/server_steps.rb
textile_manual-0.0.2 features/support/server_steps.rb