Skip to content

Instantly share code, notes, and snippets.

@mreinsch
Created February 20, 2011 14:43
Show Gist options
  • Save mreinsch/836020 to your computer and use it in GitHub Desktop.
Save mreinsch/836020 to your computer and use it in GitHub Desktop.
a very simple test example using shoulda, response to http://www.oiax.jp/rails/zakkan/test_unit_rspec_and_shoulda.html
require 'rubygems'
require 'shoulda'
class SimpleTest < Test::Unit::TestCase
context 'with 100' do
setup { @total = 100 }
should("return 100") { assert_equal(100, @total.to_i) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment