29 Kasım 2010, PAZARTESİ
Tüm Ruby testleri yükselterek: tanımsız yöntemi `' nil için:NilClass kimlik doğrulaması
Testlerimin çoğu aşağıdaki yükselterek ve neden anlamıyorum. Tüm yöntemleri yükseltmeyi 'kimlik' hata. Eğer bir yöntem "" ama böyle bir yöntem yoktur. kimlik doğrulaması çağrıldı orada hiçbir kodu kontrol ettim
1) Admin::CommentsController handling GET to index is successful
Failure/Error: get :index
undefined method `authenticate!' for nil:NilClass
# ./spec/controllers/admin/comments_controller_spec.rb:9:in `block (3 levels) in <top (required)>'
124) PostsController handling GET for a single post should render show template
Failure/Error: get :show, :year => '2008', :month => '01', :day => '01', :slug => 'a-post'
undefined method `authenticate' for nil:NilClass
# ./app/controllers/application_controller.rb:18:in `set_current_user_for_model'
# ./spec/controllers/posts_controller_spec.rb:131:in `do_get'
# ./spec/controllers/posts_controller_spec.rb:140:in `block (3 levels) in <top (required)>'
Proje var = ^ bulunabilir . Testler kendini çalıştırmak istersiniz diye https://github.com/agilepandas/enki.
CEVAP
29 Kasım 2010, PAZARTESİ
Bu soru @MatthewClosson tarafından Twitter yanıtlandı
@oluşturmanız gerekir jeffehh spec/destek/hazırlamak.rb dosyası burada belirtilen https://github.com/plataformatec/devise#test-helpers test yardımcıları planı vardır #ruby
Bir kez daha teşekkürler.
Bunu PaylaÅŸ:
' nil için:Bootstrap alırken NilC...
Form tabanlı kimlik doğrulaması için k...
Ayrıca güvenli bir web hizmetine erişi...
node.js kimlik doğrulaması için Kullan...
numarasını: ÖNEMLİ: kullanıcı "is...