Sha256: f4ddc06fa2cb2e8bdb761783e84b19c6937b4eab1f8c2e442003715260bdc9ed

Contents?: true

Size: 809 Bytes

Versions: 2

Compression:

Stored size: 809 Bytes

Contents

$:.unshift(File.join(File.dirname(__FILE__), "../../lib"))
ENV['RACK_ENV'] = 'test'
require "nuker"
require "fileutils"
require "capybara/cucumber"
require "rspec"
require "fakefs/spec_helpers"

Capybara.app = Sinatra::Application

After do
  Nuker::Project.delete_all
end

Capybara.register_driver :selenium_chrome do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.javascript_driver = :selenium_chrome

def project name
  project = Nuker::Project.first(:name => name)
  unless project
    project = Nuker::Project.create(:name => name)
  end
  project
end

def create_feature project, path, content
  project = project(project)
  feature = Nuker::Feature.new(:path => path, :gherkin => Nuker::ParsesFeatures.new.parse(content))
  project.features << feature
  project.save
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nuker-2.0.0 features/support/env.rb
nuker-1.0.0 features/support/env.rb