You have to rake migrate the test env:

rake radiant:extensions:reorder:migrate RAILS_ENV=test

On Thu, Mar 18, 2010 at 3:17 PM, Arlen Walker <arlen.wal...@gmail.com> wrote:
> This is actually common to several extensions, so I'm fairly sure I screwed 
> up something on my end, but it's just to obvious for me to see it.
>
> Starting from a completely fresh installation:
>
> 1) radiant  radiant -d mysql
> 2) cd radiant
> 3) rake radiant:freeze:edge TAG=0.8.1
> 4) cd vendor/radiant
>
> At this point I edit the database.yml file at 
> radiant/vendor/radiant/config/database.yml
>
> 5) rake db:bootstrap  (Don't know if it matters but the last time I did this 
> I chose the Roasters template)
> 6) rake spec:models
>
> The last line was to verify that the installation into the directory called 
> 'radiant' seemed to go properly, and it does appear to have, since all tests 
> passed with a deprecation warning. So now I proceed with downloading the 
> reorder extension, unzipping it, renaming the resulting directory to reorder 
> and dropping it in radiant/vendor/radiant/vendor/extensions (perhaps I should 
> have chosen a less confusing project name, but I didn't expect to have this 
> issue when I chose it). From that point:
>
> 7) rake development radiant:extensions:reorder:migrate
> 8) rake development radiant:extensions:reorder:update
>
> (I'm running apache2 with Passenger, and have set the default RailsEnv to 
> development.)
>
> 9) rake spec:models
>
> and 66 of the tests that passed the first time fail this time. All of the 
> failures are along the lines of:
>
> "Mysql::Error: Unknown column 'position' in 'order clause':"
>
> so it seems as if the migration that has occurred in line 7 above (verified 
> by inspecting the db) never happens during the testing. The extension itself 
> appears to be functioning fine in the application, as the position column is 
> filled in correctly, and it does move the pages up and down, so it looks as 
> if only the testing environment is failing to apply the migration for some 
> reason.
>
> This sort of thing is obvious enough that I'm sure I'm just missing something 
> simple, but I'm hanged if I can see it.
>
> As for variations, I've tried this with both radiant and radiant-rc, and I've 
> frozen to edge and updated as well as freezing to 0.8.1, with no difference. 
> Highlights from the local gem list are:
>
> cucumber (0.6.3, 0.3.104)
> cucumber-rails (0.3.0)
> passenger (2.2.11, 2.2.10, 2.2.9)
> radiant (0.8.1, 0.8.0)
> rails (2.3.5, 2.2.2, 1.2.6)
> rake (0.8.7, 0.8.3)
> rspec (1.3.0, 1.2.6)
> rspec-rails (1.3.2, 1.2.6)
> rubygems-update (1.3.6, 1.3.5)
> webrat (0.7.0, 0.4.4)
> ZenTest (4.2.1)
>
> Didn't want to post the whole list, let me know if there's another one that 
> might be relevant. Ruby is 1.8.7 patchlevel 72, default install on 
> SnowLeopard. (Yes, I know. I keep meaning to upgrade to 1.9.x but since this 
> isn't a public-facing machine the urgency just isn't there, and I don't 
> figure it's worth the hassle to upgrade to anything less than 1.9.x.)
>
> Ideas?
>
> Have Fun,
> Arlen
>
> ------------------------------
> In God we trust, all others must supply data
>
> _______________________________________________
> Radiant mailing list
> Post: Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> List Site: http://lists.radiantcms.org/mailman/listinfo/radiant
> Radiant: http://radiantcms.org
> Extensions: http://ext.radiantcms.org
>
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
List Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Radiant: http://radiantcms.org
Extensions: http://ext.radiantcms.org

Reply via email to