{"id":25875689,"url":"https://github.com/lenage/koans","last_synced_at":"2026-06-05T18:32:15.920Z","repository":{"id":1862558,"uuid":"2787657","full_name":"lenage/koans","owner":"lenage","description":"learn ruby by test","archived":false,"fork":false,"pushed_at":"2011-11-23T09:51:05.000Z","size":152,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-12T23:31:04.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"rubykoans.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"JulienGenoud/android-percent-support-lib-sample","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lenage.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-11-16T12:28:09.000Z","updated_at":"2014-02-02T12:33:41.000Z","dependencies_parsed_at":"2022-08-20T09:50:07.501Z","dependency_job_id":null,"html_url":"https://github.com/lenage/koans","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenage%2Fkoans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenage%2Fkoans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenage%2Fkoans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenage%2Fkoans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenage","download_url":"https://codeload.github.com/lenage/koans/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241488656,"owners_count":19970917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-02T10:19:38.360Z","updated_at":"2025-11-26T18:02:09.229Z","avatar_url":"https://github.com/lenage.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n     _________________\n    \u003c This is awesome \u003e\n     -----------------\n            \\   ^__^\n             \\  (oo)\\_______\n                (__)\\       )\\/\\\n                    ||----w |\n                    ||     ||\n\n= EdgeCase Ruby Koans\n\nThe Ruby Koans walk you along the path to enlightenment in order to learn Ruby.\nThe goal is to learn the Ruby language, syntax, structure, and some common\nfunctions and libraries. We also teach you culture. Testing is not just something we\npay lip service to, but something we live.  It is essential in your quest to learn\nand do great things in the language.\n\n== The Structure\n\nThe koans are broken out into areas by file, hashes are covered in about_hashes.rb,\nmodules are introduced in about_modules.rb, etc.  They are presented in order in the\npath_to_enlightenment.rb file.\n\nEach koan builds up your knowledge of Ruby and builds upon itself.  It will stop at\nthe first place you need to correct.\n\nSome koans simply need to have the correct answer substituted for an incorrect one.\nSome, however, require you to supply your own answer.  If you see the method +__+ (a\ndouble underscore) listed, it is a hint to you to supply your own code in order to\nmake it work correctly.\n\n== Installing Ruby\n\nIf you do not have Ruby setup, please visit http://ruby-lang.org/en/downloads/ for\noperating specific instructions.  In order to run this you need ruby and rake\ninstalled. To check the installations simply type:\n\n*nix platforms from any terminal window:\n\n   [~] $ ruby --version\n   [~] $ rake --version\n\nWindows from the command prompt (cmd.exe)\n\n   c:\\ruby --version\n   c:\\rake --version\n\nAny response for Ruby with a version number greater than 1.8 is fine (should be\naround 1.8.6 or more). Any version of rake will do.\n\n== The Path To Enlightenment\n\nYou can run the tests through rake or by calling the file itself (rake is the\nrecommended way to run them as we might build more functionality into this task).\n\n*nix platforms, from the koans directory\n\n    [ruby_koans] $ rake                           # runs the default target :walk_the_path\n    [ruby_koans] $ ruby path_to_enlightenment.rb  # simply call the file directly\n\nWindows is the same thing\n\n    c:\\ruby_koans\\rake                             # runs the default target :walk_the_path\n    c:\\ruby_koans\\ruby path_to_enlightenment.rb    # simply call the file directly\n\n=== Red, Green, Refactor\n\nIn test-driven development the mantra has always been, red, green, refactor.  Write a\nfailing test and run it (red), make the test pass (green), then refactor it (that is\nlook at the code and see if you can make it any better.  In this case you will need\nto run the koan and see it fail (red), make the test pass (green), then take a\nmoment and reflect upon the test to see what it is teaching you and improve the\ncode to better communicate its intent (refactor).\n\nThe very first time you run it you will see the following output:\n\n    [ ruby_koans ] $ rake\n    (in /Users/person/dev/ruby_koans)\n    cd koans\n\n    Thinking AboutAsserts\n      test_assert_truth has damaged your karma.\n\n    You have not yet reached enlightenment ...\n    \u003cfalse\u003e is not true.\n\n    Please meditate on the following code:\n    ./about_asserts.rb:10:in `test_assert_truth'\n    path_to_enlightenment.rb:27\n\n    mountains are merely mountains\n\nYou have come to your first stage. If you notice it is telling you where to look for\nthe first solution:\n\n    Please meditate on the following code:\n    ./about_asserts.rb:10:in `test_assert_truth'\n    path_to_enlightenment.rb:27\n\nWe then open up the about_asserts.rb file and look at the first test:\n\n    # We shall contemplate truth by testing reality, via asserts.\n    def test_assert_truth\n      assert false                # This should be true\n    end\n\nWe then change the +false+ to +true+ and run the test again.  After you are\ndone, think about what you are learning.  In this case, ignore everything except\nthe method name (+test_assert_truth+) and the parts inside the method (everything\nbefore the +end+).\n\nIn this case the goal is for you to see that if you pass a value to the +assert+\nmethod, it will either ensure it is +true+ and continue on, or fail if in fact\nthe statement is +false+.\n\n== Inspiration\n\nA special thanks to Mike Clark and Ara Howard for inspiring this\nproject.  Mike Clark wrote an excellent blog post about learning Ruby\nthrough unit testing. This sparked an idea that has taken a bit to\nsolidify, that of bringing new rubyists into the community through\ntesting. Ara Howard then gave us the idea for the Koans in his ruby\nquiz entry on Meta Koans (a must for any rubyist wanting to improve\ntheir skills).  Also, \"The Little Lisper\" taught us all the value of\nthe short questions/simple answers style of learning.\n\nMike Clark's post ::  http://www.clarkware.com/cgi/blosxom/2005/03/18\nMeta Koans        ::  http://rubyquiz.com/quiz67.html\nThe Little Lisper ::  http://www.amazon.com/Little-LISPer-Third-Daniel-Friedman/dp/0023397632\n\n== Other Resources\n\nThe Ruby Language               ::  http://ruby-lang.org\nTry Ruby in your browser        ::  http://tryruby.org\n\nDave Thomas' introduction to Ruby Programming Ruby (the Pick Axe) ::  http://pragprog.com/titles/ruby/programming-ruby\n\nBrian Marick's fantastic guide for beginners Everyday Scripting with Ruby    ::  http://pragprog.com/titles/bmsft/everyday-scripting-with-ruby\n\n= Other stuff\n\nAuthor         ::   Jim Weirich \u003cjim@weirichhouse.org\u003e\nAuthor         ::   Joe O'Brien \u003cjoe@edgecase.com\u003e\nIssue Tracker  :: http://www.pivotaltracker.com/projects/48111\nRequires       :: Ruby 1.8.x or later and Rake (any recent version)\n\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\n= when you passed all Test\n\n                                        ,,   ,  ,,\n                                      :      ::::,    :::,\n                         ,        ,,: :::::::::::::,,  ::::   :  ,\n                       ,       ,,,   ,:::::::::::::::::::,  ,:  ,: ,,\n                  :,        ::,  , , :, ,::::::::::::::::::, :::  ,::::\n                 :   :    ::,                          ,:::::::: ::, ,::::\n                ,     ,:::::                                  :,:::::::,::::,\n            ,:     , ,:,,:                                       :::::::::::::\n           ::,:   ,,:::,                                           ,::::::::::::,\n          ,:::, :,,:::                                               ::::::::::::,\n         ,::: :::::::,       Mountains are again merely mountains     ,::::::::::::\n         :::,,,::::::                                                   ::::::::::::\n       ,:::::::::::,                                                    ::::::::::::,\n       :::::::::::,                                                     ,::::::::::::\n      :::::::::::::                                                     ,::::::::::::\n      ::::::::::::                      Ruby Koans                       ::::::::::::,\n      ::::::::::::                   (in Ruby 1.9.2)                    ,::::::::::::,\n      :::::::::::,                                                      , ::::::::::::\n      ,:::::::::::::,                brought to you by                 ,,::::::::::::,\n      ::::::::::::::                                                    ,::::::::::::\n       ::::::::::::::,                                                 ,:::::::::::::\n       ::::::::::::,             EdgeCase Software Artisans           , ::::::::::::\n        :,::::::::: ::::                                               :::::::::::::\n         ,:::::::::::  ,:                                          ,,:::::::::::::,\n           ::::::::::::                                           ,::::::::::::::,\n            :::::::::::::::::,                                  ::::::::::::::::\n             :::::::::::::::::::,                             ::::::::::::::::\n              ::::::::::::::::::::::,                     ,::::,:, , ::::,:::\n                :::::::::::::::::::::::,               ::,: ::,::, ,,: ::::\n                    ,::::::::::::::::::::              ::,,  , ,,  ,::::\n                       ,::::::::::::::::              ::,, ,   ,:::,\n                            ,::::                         , ,,\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenage%2Fkoans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenage%2Fkoans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenage%2Fkoans/lists"}