testing devise with shoulda and machinist
Posted
by mattherick
on Stack Overflow
See other posts from Stack Overflow
or by mattherick
Published on 2010-04-21T19:17:11Z
Indexed on
2010/04/21
19:23 UTC
Read the original article
Hit count: 467
ruby-on-rails
|rubygems
hello! I´d like to test my app with shoulda and machinist. I use the devise authentification gem.
I get following error:
$ ruby unit/page_test.rb
c:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be rem
oved on or after August 2010. Use #requirement
c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in load_missing_constant': uninitialized constant Admins (N
ameError)
from c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
const_missing'
from c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in const_missing'
from c:/Users/Mattherick/Desktop/heimspiel/heimspiel_app/app/controllers/admins_controller.rb:1
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
from c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in
require'
from c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in require_or_load'
from c:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in
depend_on'
... 12 levels...
from ./unit/../test_helper.rb:2
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
from unit/page_test.rb:1
Somebody an idea what´s wrong? If I don´t use devise my tests are okay.
And my second question: Does somebdoy has a good tutorial for increasing different roles in the devise gem? If I generate my own views and add a few attributes to my devise-model, they won´t be save in the database. I read the docu at github, but don´t really checked it.
mattherick
© Stack Overflow or respective owner