How do I assert that a model has a readable/writable attribute?

Posted by TheDeeno on Stack Overflow See other posts from Stack Overflow or by TheDeeno
Published on 2010-04-20T00:08:02Z Indexed on 2010/04/20 0:13 UTC
Read the original article Hit count: 656

In one of my model's I'm using some meta programming to dynamically define some methods. I'd like to test this. I need a compact way to assert that my model has readable/writable attribute with a certain name. Ideas?

I'm using shoulda for unit testing if it makes a difference.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about rails