我正在使用' devise','〜> 3.5','> = 3.5.6'。
我的controller test工作,但我无法运行integration test
test_helper.rb中
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require "minitest/rails/capybara"
require "mocha/mini_test"
require "minitest/reporters"
require 'shoulda/context'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new # spec-like progress
include Devise::TestHelpers
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
include FactoryGirl::Syntax::Methods
fixtures :all
end
夹具:
default_user:
name: "User"
email: "example@example.org"
encrypted_password: "exampleexample"
示例测试文件:
class PostsTests < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
test 'authenticated users can see posts' do
sign_in users(:default_user)
end
end
错误:
NameError: uninitialized constant Devise::Test
答案 0 :(得分:0)
我似乎正在使用旧版本。我刚刚更新到4.1.1
final TextField searchField = new TextField("Who are you looking for?", newSkin);
searchField.setFocusTraversal(false);
searchField.setTextFieldListener(new TextField.TextFieldClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
super.clicked(event, x, y);
searchField.clear();
}
});