Sha256: 9a4ec9b2b6aebce065635905f36d99b3745920a791a15f0270c3b8d50794288b

Contents?: true

Size: 1.51 KB

Versions: 44

Compression:

Stored size: 1.51 KB

Contents

When /^I add "([^"]*)" to the index$/ do |files|
  files.split(",").each do |file|
    svn_module.index_add(File.new(get_dir(working_copy) + "/#{file}"))
  end
end

When /^I create a wc file named "([^"]*)"$/ do |files|
  files.split(",").each do |file|
    FileUtils.touch(get_dir(working_copy) + "/#{file}")
  end
end

When /^I create a wc directory named "([^"]*)"$/ do |dirs|
  dirs.split(",").each do |dir|
    FileUtils.mkdir_p get_dir(working_copy) + "/#{dir}"
  end
end

Then /^there should be "([^"]*)" unindexed files and "([^"]*)" indexed files$/ do |ucount, count|
    svn_module.unindexed_changes.length.should == ucount.to_i
    svn_module.indexed_changes.length.should   ==  count.to_i
end

When /^I replace "([^"]*)" contents(| in the new copy) with "([^"]*)"$/ do |file,repo,text|
  if repo == ""
    File.open(get_dir(working_copy) + "/#{file}", 'w') do |f|
      f.rewind
      f.truncate(0)
      f.puts text
    end
  else
    File.open(get_dir(working_copy_2) + "/#{file}", 'w') do |f|
      f.rewind
      f.truncate(0)
      f.puts text
    end
  end
end

Then /^the contents of wc file "([^"]*)"(| in the new copy) should be "([^"]*)"$/ do |file,repo,text|
  if repo == " in the new copy"
    File.read(get_dir(working_copy_2) + "/#{file}").rstrip.should == text
  else
    File.read(get_dir(working_copy) + "/#{file}").rstrip.should == text
  end
end

#Then /^the contents of wc file "([^"]*)" in the new copy should be "([^"]*)"$/ do |file,text|
#  File.read(get_dir(working_copy_2) + "/#{file}").rstrip.should == text
#end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
redcar-0.13 plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.13.5dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.13.4dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.13.3dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.13.2dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.13.1dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-0.12.1 plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.13.0dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-0.12 plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.27dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.26dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.25dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.24dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.23dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.22dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.21dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.20dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.19dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.18dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb
redcar-dev-0.12.17dev plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb