Sha256: 9edf846b4f13ebab54d2c5c6aee4fcc01e40f979681680be4ff56da5fe77eeb1
Contents?: true
Size: 468 Bytes
Versions: 5
Compression:
Stored size: 468 Bytes
Contents
# -*- encoding : utf-8 -*- 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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mygithug-0.5.6 | levels/rename.rb |
mygithug-0.5.5 | levels/rename.rb |
mygithug-0.5.4 | levels/rename.rb |
mygithug-0.5.3 | levels/rename.rb |
mygithug-0.5.2 | levels/rename.rb |