Sha256: 86171be7527754ce39b6be27b3a00581a85bc8134f4079ae891e9b17e19d626d

Contents?: true

Size: 436 Bytes

Versions: 18

Compression:

Stored size: 436 Bytes

Contents

difficulty 3

description "We have a file called oldfile.txt. We want to rename it to newfile.txt and stage this change."

setup do
  repo.init
  FileUtils.touch("oldfile.txt")
  repo.add("oldfile.txt")
  repo.commit_all("Commited oldfile.txt")
end

solution do
  repo.status["oldfile.txt"].type == "D" && repo.status["newfile.txt"].type == "A" && repo.status["oldfile.txt"].stage.nil?
end

hint do
  puts "Take a look at `git mv`"
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
githug-0.3.3 levels/rename.rb
githug-0.3.2 levels/rename.rb
githug-0.3.1 levels/rename.rb
githug-0.3.0 levels/rename.rb
githug-0.2.12 levels/rename.rb
githug-0.2.11 levels/rename.rb
githug-0.2.10 levels/rename.rb
githug-0.2.9 levels/rename.rb
githug-0.2.8 levels/rename.rb
githug-0.2.7 levels/rename.rb
githug-0.2.6 levels/rename.rb
githug-0.2.5 levels/rename.rb
githug-0.2.4 levels/rename.rb
githug-0.2.3 levels/rename.rb
githug-0.2.2 levels/rename.rb
githug-0.2.1 levels/rename.rb
githug-0.2.0 levels/rename.rb
githug-0.1.8 levels/rename.rb