Created
March 7, 2012 18:27
-
-
Save scott-stewart/1994946 to your computer and use it in GitHub Desktop.
shoulda matchers in plain test::unit, somebody told me you can't use them in test::unit. I said you could, it was just ugly
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
require 'test_helper' | |
require 'shoulda/matchers' | |
class BlogTest < ActiveSupport::TestCase | |
fixtures :blogs | |
test "validations" do | |
assert validate_presence_of(:title).matches?(Blog.new) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment