Sha256: 7b946e0b8b802f1e328554534f35b7ddb9fb03f820f1f0b99a7f1f093b501277

Contents?: true

Size: 667 Bytes

Versions: 5

Compression:

Stored size: 667 Bytes

Contents

module Features
  APP_NAME = "arkenstone_test".freeze

  def run_arkenstone(options = nil)
    Dir.chdir(Dir.tmpdir) do
      `#{arkenstone_bin} new #{APP_NAME} #{options}`
    end
  end

  def remove_dummy_app
    FileUtils.rm_rf(app_path)
  end

  def app_path
    File.join(Dir.tmpdir, APP_NAME)
  end

  def lib_path
    "#{app_path}/lib"
  end

  def file_contents(file)
    File.open(file, &:read)
  end

  def project_file_exist?(file)
    Dir.chdir(add_path) do
      File.exist?(file)
    end
  end

  private

  def root_path
    File.expand_path("../../../../", __FILE__)
  end

  def arkenstone_bin
    File.join(root_path, "bin", "arkenstone")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arkenstone-0.6.0 spec/support/features/new_project.rb
arkenstone-0.5.2 spec/support/features/new_project.rb
arkenstone-0.5.1 spec/support/features/new_project.rb
arkenstone-0.3.0 spec/support/features/new_project.rb
arkenstone-0.2.0 spec/support/features/new_project.rb