Sha256: 6129bfd0e605dc5281fd09164079259347e1f00e86a2826c5dcc80291919f5e2
Contents?: true
Size: 800 Bytes
Versions: 5
Compression:
Stored size: 800 Bytes
Contents
difficulty 3 description "You forgot to branch at the previous commit and made a commit on top of it. Create branch 'test_branch' at the commit before the last" setup do repo.init FileUtils.touch("file1") repo.add("file1") repo.commit_all("Adding file1") File.open("file1", 'w') { |f| f.write("content") } repo.add("file1") repo.commit_all("Updating file1") File.open("file1", 'a') { |f| f.write("\nAdding some more text") } repo.add("file1") repo.commit_all("Updating file1 again") end solution do return false unless repo.branches.map(&:name).include?("test_branch") repo.commits("test_branch").each { |commit| return false if commit.message == "Updating file1 again" } true end hint do puts "Just like creating a branch, but you have to pass an extra argument" end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
githug-0.3.3 | levels/branch_at.rb |
githug-0.3.2 | levels/branch_at.rb |
githug-0.3.1 | levels/branch_at.rb |
githug-0.3.0 | levels/branch_at.rb |
githug-0.2.12 | levels/branch_at.rb |