Sha256: 19ef0baf4d9913a0fe6dfbccc3b2730791ee683be9c9e8096136860401883680

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 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

3 entries across 3 versions & 1 rubygems

Version Path
githug-0.1.7 levels/rename.rb
githug-0.1.6 levels/rename.rb
githug-0.1.5 levels/rename.rb