Created
April 21, 2009 02:38
-
-
Save larrywright/98899 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
class UserTest < Test::Unit::TestCase | |
context "A User instance" do | |
setup do | |
@user = User.find(:first) | |
end | |
should "return its full name" do | |
assert_equal 'John Doe', @user.full_name | |
end | |
context "with a profile" do | |
setup do | |
@user.profile = Profile.find(:first) | |
end | |
should "return true when sent #has_profile?" do | |
assert @user.has_profile? | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment