Sha256: 26a7f04d1aa1eb3b3eae6698205471aed14228f877a0515c1ddf0cea39c8f019

Contents?: true

Size: 1.98 KB

Versions: 114

Compression:

Stored size: 1.98 KB

Contents

Given 'a working directory' do
  @working_dir = create_construct
end

After do
  @working_dir.destroy! if @working_dir
end

Given /^I use the jeweler command to generate the "([^"]+)" project in the working directory$/ do |name|
  @name = name

  return_to = Dir.pwd
  path_to_jeweler = File.expand_path File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jeweler')

  begin
    FileUtils.cd @working_dir
    @stdout = `#{path_to_jeweler} #{@name}`
  ensure
    FileUtils.cd return_to
  end
end

Given /^"([^"]+)" does not exist$/ do |file|
  assert ! File.exists?(File.join(@working_dir, file))
end

When /^I run "([^"]+)" in "([^"]+)"$/ do |command, directory|
  full_path = File.join(@working_dir, directory)

  lib_path = File.expand_path 'lib'
  command.gsub!(/^rake /, "rake --trace -I#{lib_path} ")

  assert File.directory?(full_path), "#{full_path} is not a directory"

  @stdout = `cd #{full_path} && #{command}`
  @exited_cleanly = $?.exited?
end

Then /^the updated version, (.*), is displayed$/ do |version|
  assert_match "Updated version: #{version}", @stdout
end

Then /^the current version, (\d+\.\d+\.\d+), is displayed$/ do |version|
  assert_match "Current version: #{version}", @stdout
end

Then /^the process should exit cleanly$/ do
  assert @exited_cleanly, "Process did not exit cleanly: #{@stdout}"
end

Then /^the process should not exit cleanly$/ do
  assert !@exited_cleanly, "Process did exit cleanly: #{@stdout}"
end

Given /^I use the existing project "([^"]+)" as a template$/ do |fixture_project|
  @name = fixture_project
  FileUtils.cp_r File.join(fixture_dir, fixture_project), @working_dir
end

Given /^"VERSION\.yml" contains hash "([^"]+)"$/ do |ruby_string|
  version_hash = YAML.load(File.read(File.join(@working_dir, @name, 'VERSION.yml')))
  evaled_hash = eval(ruby_string)
  assert_equal evaled_hash, version_hash
end

Given /^"VERSION" contains "([^\"]*)"$/ do |expected|
  version = File.read(File.join(@working_dir, @name, 'VERSION')).chomp
  assert_equal expected, version
end

Version data entries

114 entries across 60 versions & 6 rubygems

Version Path
jeweler-2.1.1 features/step_definitions/filesystem_steps.rb
jeweler-2.0.1 features/step_definitions/filesystem_steps.rb
jeweler-2.0.0 features/step_definitions/filesystem_steps.rb
jeweler-1.8.8 features/step_definitions/filesystem_steps.rb
jeweler-1.8.7 features/step_definitions/filesystem_steps.rb
jeweler-1.8.6 features/step_definitions/filesystem_steps.rb
jeweler-1.8.5 features/step_definitions/filesystem_steps.rb
devise_sociable-0.1.0 vendor/bundle/gems/jeweler-1.8.4/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/features/step_definitions/filesystem_steps.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/features/step_definitions/filesystem_steps.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/features/step_definitions/filesystem_steps.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/features/step_definitions/filesystem_steps.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/features/step_definitions/filesystem_steps.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/features/step_definitions/filesystem_steps.rb