/deviseworking/test/integration/adminflow_test.rb:4:in `<class:AdminflowTest>': uninitialized constant Devise::Test (NameError)
You can have a look at:
https://github.com/jezcaudle/devise-example
This is what I did:
Bundler version 1.11.2
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
Rails 5.0.0.beta4
Devise 4.1.1
warden 1.2.6
orm_adapter 0.5.0
rails new deviseworking
cd deviseworking/
Add to Gem file:
gem ‘devise'
bundle
installs devise 4.1.1
rails generate devise:install
Add:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
to both development.rb and test.rb
To routes.rb add:
root to: "home#index”
resources :tworks
rails generate devise
rake db:migrate
rails generate scaffold twork name:string address:string
rake db:migrate
Delete everything in test/fixtures/users.yml and paste in:
admin:
id: 1
email: "j...@example.ltd.uk"
encrypted_password: "$2a$04$ksQH6hvij.p0ty2Syd/D.OTf.Vp8fg7Le.QPHyrbUDY3klr8Kwnia"
reset_password_token: <%= nil %>
reset_password_sent_at: <%= nil %>
remember_created_at: <%= nil %>
sign_in_count: 1
current_sign_in_at: "2012-11-16 11:49:14"
last_sign_in_at: "2012-11-16 11:49:14"
current_sign_in_ip: "127.0.0.1"
last_sign_in_ip: “127.0.0.1"
Fix incorrect indentation while swearing a lot.
Do:
rails g integration_test adminflow
Edit the integration test and below the class line add:
include Devise::Test::IntegrationHelpers
Run the test:
rails test test/integration/adminflow_test.rb
Get an error:
/deviseworking/test/integration/adminflow_test.rb:4:in `<class:AdminflowTest>': uninitialized constant Devise::Test (NameError)
--
---
You received this message because you are subscribed to the Google Groups "Devise" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-devise+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-devise+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Devise" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.