Tag: autotest

Ubuntu虚拟环境上的自动测试通知

我无法让Rails自动测试通知在Engine Yard Vagrant环境中工作。 在Mac上,我通常通过Growl收到通知。 但是,在运行Ubuntu的虚拟环境中不起作用。 我尝试运行Linux通知设置,如libnotify + autotest-notification,但是我收到以下错误: libnotify-Message: Unable to get session bus: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed. ** (notify-send:1004): CRITICAL **: dbus_g_proxy_connect_signal: assertion `DBUS_IS_G_PROXY (proxy)’ failed ** (notify-send:1004): CRITICAL **: dbus_g_proxy_connect_signal: assertion `DBUS_IS_G_PROXY (proxy)’ failed ** (notify-send:1004): CRITICAL **: dbus_g_proxy_call: assertion `DBUS_IS_G_PROXY (proxy)’ failed 另一条路径是让Growl远程接收通知,但我甚至不知道从哪里开始…… 有什么建议?

在轨道上的ruby中自动测试出错

我运行命令autotest,这是我得到的错误。 我正在关注Hartl的书,并想知道这场冲突是否正在发生,因为rails现在附带ZenTest或其他东西? 我如何解决此错误。 我是RoR的新手 Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement [“= 1.8”] Invalid gemspec in [/Users//.rvm/gems/ruby-1.9.2-p320@twitclone/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement [“= 1.8”] /Users//.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs’: Could not find ZenTest (>= 0) amongst [abstract-1.0.0, actionmailer-3.2.8, actionmailer-3.2.8.rc1, actionmailer-3.0.1, actionmailer-3.0.0, actionpack-3.2.8, actionpack-3.2.8.rc1, actionpack-3.0.1, actionpack-3.0.0, activemodel-3.2.8, activemodel-3.2.8.rc1, activemodel-3.0.1, activemodel-3.0.0, activerecord-3.2.8, activerecord-3.2.8.rc1, activerecord-3.0.1, activerecord-3.0.0, activeresource-3.2.8, activeresource-3.2.8.rc1, activeresource-3.0.1, activeresource-3.0.0, activesupport-3.2.8, activesupport-3.2.8.rc1, activesupport-3.0.1, activesupport-3.0.0, addressable-2.3.2, […]

将自定义目录(源和规范)添加到Rails 3项目中的自动测试

我有一个使用RSpec2作为我的测试框架的Rails 3应用程序,我可以使用自动测试来观察我的模型和spec目录以进行更改,并在文件更改时重新运行我的规范套件。 我想在其中添加一个包含一些自定义类的目录(RAILS_ROOT / lib / some_project / lib / .rb)及其相应的规范(RAILS_ROOT / spec / some_project / _spec.rb),以便自动测试会自动获取更改所有这些文件并根据需要重新运行。 如何让autotest在这些其他目录中观看这些文件? 我怀疑我必须向RAILS_ROOT / autotest / discover.rb添加一些内容,但我不确定该怎么做。

如何在Rails测试中结合自动测试和spork?

自动测试通过仅运行更改的测试来提高测试运行的速度。 但是我想通过使用spork预加载Rails环境来进一步推动它,这样我将获得更快的反馈。 这可能吗? 自动测试: https : //github.com/grosser/autotest Spork: http ://github.com/timcharper/spork

ZenTest自动测试没有运行测试

我遇到了自动测试的问题,之前我通过将ZenTest 4.1.4降级到4.1.3来解决问题。 $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] $ rails -v Rails 2.3.4 目前我发现在我的Mac OS 10.6.1 Snow Leopard系统上,当我在我的项目中运行$ autotest ,没有运行任何测试,我得到了这个输出…… $ autotest /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I.:lib:test -rubygems -e “%w[test/unit test/test_helper.rb].each { |f| require f }” | unit_diff -u Loaded suite -e Started Finished in 0.000225 seconds. 0 tests, 0 assertions, 0 failures, 0 errors […]