Does look as if db:setup does a portion at least of this. But bootstrap fails at an interesting point ("interesting" as in "WTF is going on with this?") so I'm going to take it apart a bit more so I can understand what's happening and why. (Nutshell version: the Radiant::setup method seems to be executing with a completely different User model than actually exists in the reality of the code. The attributes do not agree with either of the two schemas in the code nor with the actual database table.)After some experimentation it appears Radiant::Setup.create_admin_user fails with the version bump of Rails 3.2.8 -- all 3.2.x at or below that point get the correct User attributes, all versions above that get a completely bollixed version of User. I'm tempted to blame it on Sprockets 2.2 (2.1.4 works, 2.2.3 does not) but I'm not chasing that rabbit any farther down this hole. This means the bootstrap code itself is dead with the current radiant.gemspec (s.add_dependency "rails", ">= 3.2" results in 3.2.20).Not necessarily a big loss in itself, but it may lead to an explanation of some of the failing tests I'm seeing. And it means that even for Rails 3.2 we're probably better off with db:setup than bootstrap. In fact, since db:setup will also run db:seed, much of what happens in bootstrap might be set to happen there.
28) User roles should not have a non-existent role
Failure/Error: let(:existing){ FactoryGirl.build(:user) }
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:224:in `block (2 levels) in <top (required)>'
# ./spec/models/user_spec.rb:227:in `block (2 levels) in <top (required)>'
29) User roles should not have a role for which the corresponding method returns false
Failure/Error: let(:existing){ FactoryGirl.build(:user) }
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:224:in `block (2 levels) in <top (required)>'
# ./spec/models/user_spec.rb:231:in `block (2 levels) in <top (required)>'
30) User roles should have a role for which the corresponding method returns true
Failure/Error: let(:designer){ FactoryGirl.build(:user, designer: true) }
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:223:in `block (2 levels) in <top (required)>'
# ./spec/models/user_spec.rb:236:in `block (2 levels) in <top (required)>'
User roles
. should not have a non-existent role
. should not have a role for which the corresponding method returns false
. should have a role for which the corresponding method returns true