Skip to content

convio/watirmark_koans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watirmark Koans

The Watirmark Koans walk you along the path to enlightenment in order to learn the Watirmark Framework. Watirmark is used to create automated unit tests that navigate through a browser just as an individual would. The goal is to learn how to use Watirmark in order to write clean automated tests. The koans will take you through Watirmarks MVC framework explaining how Models, Views, and Controllers are created and what they are intended to do.

The Structure

The koans are broken out into areas by file, models are covered in about_models.rb, controllers are introduced in about_controllers.rb, etc. They are presented in order in the path_to_enlightenment.rb file.

Each koan builds up your knowledge of Watirmark and builds upon itself. It will stop at the first place you need to correct.

Some koans simply need to have the correct answer substituted for an incorrect one. Some, however, require you to supply your own answer. If you see the method __ (a double underscore) listed, it is a hint to you to supply your own code in order to make it work correctly.

Setting up the Koans

If you do not have Ruby setup, please visit ruby-lang.org/en/downloads/ for operating specific instructions. In order to run this you need the ruby version 2.0 or greater.

You will also need to install the gem bundler. Type the following command in your comand prompt after ruby has been installed

c:>gem install bundler

Watirmark Koans has a Gemfile and Gemfile lock inside the project which are used for managing all the projects gem dependencies. In order to install these gems using the bundler gem we previously installed cd into the project directory and type to the following command

c:\watirmark_koans>bundle install
....
....
Your bundle is complete!

Generating the Koans

A fresh checkout will not include the koans, you will need to generate them.

We will be using the rake that was installed by the previous bundle install command in order to generate the koans so we need to be sure to run rake in the context of bundler.

If you are using the command prompt use the following the generate or regenerate the koans. (Some IDE’s will have a run configuration that enables you to run rake in the context of bundle)

c:\watirmark_koans>bundle exec rake gen                       # generates the koans directory

c:\watirmark_koans>exec rake regen                     # regenerates the koans directory, wiping the original

The Path To Enlightenment

To start the path to enlightenment run the rake task “walk_the_path”. You will continue to run this task as you progress through the koans

c:watirmark_koans>bundle exec rake walk_the_path

License

RubyKoans is released under a Creative Commons, Attribution-NonCommercial-ShareAlike, Version 3.0 (creativecommons.org/licenses/by-nc-sa/3.0/) License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published