Created
August 24, 2009 21:05
-
-
Save latompa/174181 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# In the following test, the setup is supposed to create a variable, | |
# but fails because of a missing method | |
# | |
# If you run this test, you wont see the setup error, | |
# it's being masked by teardown, because @some_object is nil | |
# | |
require 'test/unit' | |
require 'rubygems' | |
require 'shoulda' | |
class NewTest < Test::Unit::TestCase | |
context "my context" do | |
setup do | |
@some_object = get_object | |
end | |
context "testing stuff" do | |
should "do stuff" do | |
p "doing it" | |
end | |
teardown do | |
@some_object.destroy | |
end | |
end | |
end | |
en |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment