Skip to content

Commit

Permalink
Merge pull request #6 from mattwildig/minitest
Browse files Browse the repository at this point in the history
Use minitest rather than test/unit
  • Loading branch information
norman committed Jun 13, 2012
2 parents 47505ac + ed0ea41 commit 1528820
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -32,19 +32,19 @@ feature.


### Ruby ### ### Ruby ###


In order to make it as easy as possible for non-Ruby programmers to run the The Ruby test runner uses minitest, the same as the Ruby Haml implementation.
Ruby Haml tests, the Ruby test runner uses test/unit, rather than something To run the tests you probably only need to install `haml`, `minitest` and
fancier like Rspec. To run them you probably only need to install `haml`, and
possibly `ruby` if your platform doesn't come with it by default. If you're possibly `ruby` if your platform doesn't come with it by default. If you're
using Ruby 1.8.x, you'll also need to install `json`: using Ruby 1.8.x, you'll also need to install `json`:


sudo gem install haml sudo gem install haml
sudo gem install minitest
# for Ruby 1.8.x; check using "ruby --version" if unsure # for Ruby 1.8.x; check using "ruby --version" if unsure
sudo gem install json sudo gem install json


Then, running the Ruby test suite is easy: Then, running the Ruby test suite is easy:


ruby -rminitest/autorun ruby_haml_test.rb ruby ruby_haml_test.rb


At the moment, running the tests with Ruby 1.8.7 fails because of issues with At the moment, running the tests with Ruby 1.8.7 fails because of issues with
the JSON library. Please use 1.9.2 until this is resolved. the JSON library. Please use 1.9.2 until this is resolved.
Expand Down
4 changes: 2 additions & 2 deletions ruby_haml_test.rb
@@ -1,9 +1,9 @@
require "rubygems" require "rubygems"
require "test/unit" require "minitest/autorun"
require "json" require "json"
require "haml" require "haml"


class HamlTest < Test::Unit::TestCase class HamlTest < MiniTest::Unit::TestCase
contexts = JSON.parse(File.read(File.dirname(__FILE__) + "/tests.json")) contexts = JSON.parse(File.read(File.dirname(__FILE__) + "/tests.json"))
contexts.each do |context| contexts.each do |context|
context[1].each do |name, test| context[1].each do |name, test|
Expand Down

0 comments on commit 1528820

Please sign in to comment.