search for: assert_false

Displaying 3 results from an estimated 3 matches for "assert_false".

2006 Oct 05
0
ActiveRecord Validations - validates_uniqueness_of
...e: > What I would really want to ensure here is that Person validates > uniqueness of email, not how it does it. What I would do is something > like: > > def test_person_should_validate_uniqueness_of_email > assert_true Person.new(:email => "a at b.com").save > assert_false Person.new(:email => "a at b.com").save > end > > The primary argument against this approach is that this test requires > real interaction w/ the database and unit tests aren''t supposed to > interact w/ the database. While I usually agree w/ that perspective, I...
2006 Sep 12
4
ActiveRecord Validations - validates_uniqueness_of
Hello, I''m wanting to use Mocha and Stubba for my tests in place of the default Rails testing with fixtures. I have the following class: class Person < ActiveRecord::Base validates_uniqueness_of :email end and am wondering how I can test to ensure that the validates_uniqueness_of validation is running. Any ideas? -Jonathan
2015 Mar 25
2
[LLVMdev] [PATCH] Test failures
...(fd); @@ -134,7 +134,7 @@ TEST(SanitizerCommon, InternalMmapWithOffset) { char tmpfile[128]; temp_file_name(tmpfile, sizeof(tmpfile), "sanitizer_common.internalmmapwithoffset.tmp."); - uptr res = OpenFile(tmpfile, WrOnly); + uptr res = OpenFile(tmpfile, RdWr); ASSERT_FALSE(internal_iserror(res)); fd_t fd = res; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments...