Skip to content

Commit

Permalink
delete branch level
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Smilansky committed Dec 4, 2013
1 parent cc848e8 commit 7ca47ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions TODO
@@ -0,0 +1 @@
FIND THE JOKER
6 changes: 4 additions & 2 deletions levels/delete_branch.rb
@@ -1,16 +1,18 @@
difficulty 2

description "You have created too many branches for your project. There is an old branch in your repo called 'delete_me', you should delete it."

setup do
repo.init
FileUtils.touch("README")
repo.add "README"
repo.commit_all("Initial commit")
repo.head
repo.git.native :checkout, {"b" => true}, 'delete_me'
repo.git.native :checkout, {}, 'master'
end

solution do
return true unless repo.branches.map(&:name).include("delete_me")
return true unless repo.branches.map(&:name).include?('delete_me')
end

hint do
Expand Down
1 change: 1 addition & 0 deletions myfile.txt
@@ -0,0 +1 @@
THIS TEXT DOESN'T MATTER

0 comments on commit 7ca47ee

Please sign in to comment.