[rspec-users] [cucumber] Creating an item without worrying about validity?

Tom Ten Thij lists at ruby-forum.com
Fri Mar 20 06:59:08 EDT 2009

In order to check at the cucumber level if permissions are working
correctly I am trying to write a cucumber scenario that tests if a
logged in user can create a certain model.

The step I am trying to implement is 'When I post valid attributes of a
frooble'. What I have been trying to do is build a frooble using a
factory and doing a post using it attributes. This makes me run into the
same issue as http://www.ruby-forum.com/topic/167579.

The alternative is to have to have to go through the steps of filling in
a valid form for a frooble, but I do not really care about that at this
stage, having to write them for each model will cost a lot of time and
it will cause brittleness in my tests.

Any suggestions? Should I give up trying to do this elegantly?

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list