lines 5 to 8 simulate a login; all fine, but after line 56 I'd like to
test the reverse that everything is blocked when the user is not logged
in. So the question is how could I not do that setup routine after line
56, or is there a better way ?
lines 5 to 8 simulate a login; all fine, but after line 56 I'd like to
test the reverse that everything is blocked when the user is not logged
in. So the question is how could I not do that setup routine after line
56, or is there a better way ?
You could just have two separate test files, or you might want to look
at shoulda
Is my approach a reasonable way to go? I only ask as it's a problem I've
come up against a few times (how to login in tests) - whether it's via
authlogic or basic http auth as in this case. Realising that I can add
other methods to test_helper.rb that could help me out in a similar way!
lines 5 to 8 simulate a login; all fine, but after line 56 I'd like to
test the reverse that everything is blocked when the user is not logged
in. So the question is how could I not do that setup routine after line
56, or is there a better way ?
There is a better way: use Cucumber. Functional tests basically suck.