git clone https://github.com/bborn/communityengine.git bundle (make sure you're using Ruby 1.9.3) RAILS_ENV=test bundle exec rake db:drop db:create db:migrate bundle exec rake test
(From .travis.yml<https://github.com/bborn/communityengine/blob/master/.travis.yml> ) On Sun, Aug 4, 2013 at 11:20 PM, Alex M <zap...@gmail.com> wrote: > Hi Pavel, > > This is a good question that I think @bborn should clarify. I am still > trying to wrap my head around tests here, but from what I gather the issue > is that it's looking for test.sqlite3 in test/testapp directory which of > course doesn't have it. When you run rake db:test:prepare it's creating one > in the Rails root directory. Here's what I needed to do to fix it: > > - edit test/test_helper.rb file > - line 4 change to: > require File.expand_path("../../config/environment", __FILE__) > - line 16 change to: > ActiveSupport::TestCase.fixture_path = (Rails.root + > "test/fixtures").to_s > > Then run: > bundle exec rake test > > Tests should start to run now. Although in my case I am getting quite a > few of mass-assignment test errors, which isn't happening in my development > live environment, so I am thinking a lot of the tests need to be changed. > Would like to hear what @bborn has to say, maybe I am wrong. > > Cheers. > > > On Tuesday, June 4, 2013 2:11:20 AM UTC-7, Pavel Kartavyy wrote: >> >> Hello, I am a new CE and RoR user. >> I installed master branch of CE according to instructions at github. >> I use rails 3.2.8. When i used 3.2.13 it failed in sign up with this >> error >> >> I want to check that all configured correctly, so I want to run CE tests >> in my new app. >> $ bin/rake test >> Only my tests running. >> >> I tried >> $ bin/rake community_engine:test >> $ rake aborted! >> $ Don't know how to build task 'community_engine:test >> >> Also I tried to run tests from community engine repo. >> $ git clone >> git://github.com/bborn/**communityengine.git<http://github.com/bborn/communityengine.git> >> $ bundle install --binstubs; bin/rake install:migrations; bin/rake >> db:migrate >> $ bin/rake test >> >> A lot of error messages like >> http://paste.kde.org/**757994/<http://paste.kde.org/757994/> >> The strange thing is that size of test.sqlite3 is 0 >> >> communityengine$ ls -la test/testapp/db/ >> drwxrwxr-x 2 ubuntu ubuntu 4096 Jun 4 10:56 . >> drwxrwxr-x 12 ubuntu ubuntu 4096 Jun 4 10:55 .. >> -rw-r--r-- 1 ubuntu ubuntu 120832 Jun 4 10:55 development.sqlite3 >> -rw-rw-r-- 1 ubuntu ubuntu 15834 Jun 4 10:55 schema.rb >> -rw-rw-r-- 1 ubuntu ubuntu 353 Jun 4 10:53 seeds.rb >> -rw-r--r-- 1 ubuntu ubuntu 0 Jun 4 10:56 test.sqlite3 >> >> I tried a hack. >> If i make copy development db to test db than some tests will paste, bum >> most obviously fails. >> $cp test/testapp/db/development.**sqlite3 test/testapp/db/test.sqlite3 >> >> >> >> So I am interested how to run tests? >> >> If it makes things easier I can provide access by ssh for my virtual >> machine. >> Thanks for help in advance. >> > -- > You received this message because you are subscribed to the Google Groups > "CommunityEngine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to communityengine+unsubscr...@googlegroups.com. > To post to this group, send email to communityengine@googlegroups.com. > Visit this group at http://groups.google.com/group/communityengine. > > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To unsubscribe from this group and stop receiving emails from it, send an email to communityengine+unsubscr...@googlegroups.com. To post to this group, send email to communityengine@googlegroups.com. Visit this group at http://groups.google.com/group/communityengine. For more options, visit https://groups.google.com/groups/opt_out.