search for: modelassertions

Displaying 1 result from an estimated 1 matches for "modelassertions".

Did you mean: model_assertions
2009 Apr 07
3
assert_valid in unit tests after upgrade to rails 2.3 doesn't work
def test_valid assert_valid State.first end Error: test_valid(StateTest): NoMethodError: undefined method `assert_valid'' for #<StateTest: 0x7f0d60750318> I see that test_valid is now in ActionController::Assertions::ModelAssertions. Does this mean that test_valid is designed to be used i ActionController tests only? I can change my assert_valid(State.first) into assert (State.first.valid?) but assert_valid prints meaninful failure messages, unlike assert which just tells me "nil is not true". How can I use assert_v...