Sha256: 1d253a77ca2371cb7d588678da712f344bed3ff8510ec656d82b8999256e86c7

Contents?: true

Size: 1.05 KB

Versions: 32

Compression:

Stored size: 1.05 KB

Contents

require 'aruba/cucumber'

module ArubaExt
  def run(cmd)
    super(cmd =~ /^rspec/ ? "bin/#{cmd}" : cmd)
  end
end

World(ArubaExt)

Before do
  @aruba_timeout_seconds = 30
end

unless File.directory?('./tmp/example_app')
  system "rake generate:app generate:stuff"
end

def aruba_path(file_or_dir)
  File.expand_path("../../../#{file_or_dir.sub('example_app','aruba')}", __FILE__)
end

def example_app_path(file_or_dir)
  File.expand_path("../../../#{file_or_dir}", __FILE__)
end

def write_symlink(file_or_dir)
  source = example_app_path(file_or_dir)
  target = aruba_path(file_or_dir)
  system "ln -s #{source} #{target}"
end

def copy(file_or_dir)
  source = example_app_path(file_or_dir)
  target = aruba_path(file_or_dir)
  system "cp -r #{source} #{target}"
end

Before do
  steps %Q{
    Given a directory named "spec"
  }

  Dir['tmp/example_app/*'].each do |file_or_dir|
    if !(file_or_dir =~ /spec$/)
      write_symlink(file_or_dir)
    end
  end

  ["spec/spec_helper.rb"].each do |file_or_dir|
    write_symlink("tmp/example_app/#{file_or_dir}")
  end
end

Version data entries

32 entries across 27 versions & 5 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/features/support/env.rb
rspec-rails-3.0.0.beta2 features/support/env.rb
rspec-rails-2.99.0.beta2 features/support/env.rb
rspec-rails-2.14.1 features/support/env.rb
rspec-rails-3.0.0.beta1 features/support/env.rb
rspec-rails-2.99.0.beta1 features/support/env.rb
rspec-rails-2.14.0 features/support/env.rb
rspec-rails-2.13.1 features/support/env.rb
rspec-rails-2.13.0 features/support/env.rb
rspec-rails-2.12.2 features/support/env.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/features/support/env.rb
rspec-rails-2.12.1 features/support/env.rb
rspec-rails-2.12.0 features/support/env.rb
rspec-rails-2.11.4 features/support/env.rb
gem_repackager-0.1.0 support/gems/rspec-rails-2.11.0/features/support/env.rb
rspec-rails-2.11.0 features/support/env.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/features/support/env.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/features/support/env.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/features/support/env.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/features/support/env.rb