我想在测试中比较两个xml字符串,但测试由于空格而一直失败.
@Test
public void testForEquality() throws Exception {
String myControlXML = "<msg><uuid>0x00435A8C</uuid></msg>";
String myTestXML = "<msg><uuid>0x00435A8C</uuid> </msg>";
assertXMLEqual(myControlXML, myTestXML);
Diff diff = new Diff(myControlXML, myTestXML);
assertTrue(diff.similar());
}
Run Code Online (Sandbox Code Playgroud) 我们想要向我们的管理员添加帮助页面,我们正在使用活动的admin gem.此页面与任何模型都没有关联,因此我正在努力弄清楚如何让链接显示在每个页面的菜单栏中.
当我从命令提示符运行mvn测试时,它不会显示在构建结束时哪些测试失败.不应该在测试中列出失败的测试错误吗?我正在使用windows xp :(我已经在命令提示符和console2中尝试过了.
结果:
Tests in error:
Tests run: 402, Failures: 0, Errors: 1, Skipped: 2
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
Please refer to C:\code\btlims\java\chippingmanager\chipping-manager-client\target\surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 27 seconds
[INFO] Finished at: Tue Mar 29 09:19:58 CDT 2011
[INFO] Final Memory: 24M/43M
[INFO] ------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud) 如何在ELB上设置和更新ruby版本?
我一直在使用ruby 2.2.2我们的qa并且使用env's大约8个月了.我刚刚设置我们的生产env星期一,它不会部署,因为它说ruby设置为2.2.3,我的gemfile说2.2.2.我更新并重新部署,一切似乎都很好.
我回到了qa/staging env,无法让它更新为ruby 2.2.3.保持说ruby版本是2.2.2,Gemfile是2.2.3
我升级了(通过elb ui):
64bit Amazon Linux 2015.03 v1.3.1 running Ruby 2.2 (Passenger Standalone) 至
64bit Amazon Linux 2015.09 v2.0.6 running Ruby 2.2 (Passenger Standalone)
现在它说Your Ruby version is 2.2.3, but your Gemfile specified 2.2.2.必须有一种更简单的方法来做到这一点.
我们刚刚开始使用PaperTrail gem,并注意到版本表中 75% 的记录列为零object_changes。知道为什么会发生这种情况以及我们如何阻止它吗?
使用 Rails 5.1 和 PaperTrail 10.1。
我刚刚在我的rails应用程序中添加了活动管理员,但我无法创建新用户.我正在使用活动管理员创建的用户模型以及一些添加的列,如名字和姓氏.当我为新用户填写表单并单击"创建新用户"时,该页面将刷新但不保存我的用户,并且不会使用成功消息进入回顾页面.
这是我的AdminUser模型
class AdminUser < ActiveRecord::Base
devise :database_authenticatable,
:recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :password, :password_confirmation, :remember_me, :first_name, :last_name
end
Run Code Online (Sandbox Code Playgroud)
这是我的活跃管理员课程
ActiveAdmin.register AdminUser do
index do
column :first_name
column :last_name
column :email
default_actions
end
form do |f|
f.inputs "User Details" do
f.inputs :email
f.inputs :first_name
f.inputs :last_name
end
f.buttons
end
end
Run Code Online (Sandbox Code Playgroud) activeadmin ×2
devise ×1
java ×1
junit ×1
maven ×1
ruby ×1
testing ×1
windows-xp ×1
xmlunit ×1