Mocked models' names being overwritten by rspec

Hi – I have a model that has a name attribute, and a method I’m
speccing to
remove all models from a collection if they have a name that starts with
My problem is that RSpec seems to be overwriting the name attribute, so
spec is failing when (I’m pretty sure) it should be passing.
When I run it, none of the underscore-prefixed models are removed, and
RSpec’s complaint lists all the models that were in the original list,
with names like “Model_1007”, “Model_1008” – basically, the kinds of
that mock_model might give.
Can anyone advise?

Please ignore me, I’m a drooling moron. :slight_smile:

2009/4/30 doug livesey [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs