Did you add the new role in a migration as well? Look at 056_create_roles.rb
On Sat, Mar 13, 2010 at 8:19 PM, Patrick Minton <[email protected]>wrote: > I added a new role to the Role model. However, I can't test it because > whenever I run the tests I get: > > mbpatrick:thecommunity patrick$ ruby test/unit/ad_test.rb > /Users/patrick/src/hylo/thecommunity/vendor/plugins/community_engine/plugins/enumerations_mixin/lib/active_record/acts/enumerated.rb:125:in > `enforce_strict_literals': Couldn't find a Role identified by (:publisher) > (ActiveRecord::RecordNotFound) > > Before you ask, yes, I have added the :publisher role to the fixture > roles.yml > > The problem as far as I can tell is that the error is occurring when it > loads environment.rb, which loads the User model, which references my new > role. All of this occurs before any migration can take place (because > compilation fails before migration). > > Any ideas how I get around this? Seems like a chicken/egg problem > > Patrick > > -- > You received this message because you are subscribed to the Google Groups > "CommunityEngine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<communityengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/communityengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/communityengine?hl=en.
