- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在尝试将 rake 配置为使用 ci_reporter for Hudson 从 rspec 生成报告。
使用下面的 rake 文件,使用 spec 命令运行时通过的相同测试无法使用新的 rake 文件运行。首先有很多警告(我省略了,因为它们太多无法显示)。
看起来 ci_reporter 正在生成报告,但它们是空的。
如有任何帮助,我们将不胜感激!
谢谢!-劳拉
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'spec/version'
require 'spec/rake/spectask'
require 'rcov'
require 'tasks/rails'
gem 'ci_reporter'
require 'ci/reporter/rake/rspec'
def rspec_report_path
"reports/rspec/"
end
namespace :ci do
task :pre_ci do
ENV["CI_REPORTS"] = rspec_report_path
gem 'ci_reporter'
require 'ci/reporter/rake/rspec'
end
task :rspec => [:pre_ci, "ci:setup:rspec"]
desc "do rspec tests and test coverage"
@suite = Spec::Rake::SpecTask.new('rspec') do |t|
# t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_files = FileList['spec/models/assignment_spec.rb']
t.warning = true
t.rcov = false
t.rcov_dir = 'coverage'
t.fail_on_error = false
t.rcov_opts = ['--exclude', "kernel,load-diff-lcs\.rb,instance_exec\.rb,lib/spec.rb,lib/spec/runner.rb,^spec/*,bin/spec,examples,/gems,/Library/Ruby,\.autotest,#{ENV['GEM_HOME']}", '-I', 'lib/']
end
end
错误:
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/whiny_nil.rb:52:in `method_missing': undefined method `metadata' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:46:in `name'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:146
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:140:in `each'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:140
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:136:in `to_xml'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:86
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:85:in `each'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:85
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:84:in `to_xml'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/report_manager.rb:18:in `write_report'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/report_manager.rb:17:in `open'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/report_manager.rb:17:in `write_report'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:203:in `write_report'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:207:in `new_suite'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:114:in `example_group_started'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/reporter.rb:19:in `example_group_started'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/reporter.rb:18:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/reporter.rb:18:in `example_group_started'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:115:in `notify'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:96:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in `run_examples'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner.rb:61:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner.rb:45
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/whiny_nil.rb:52:in `method_missing': undefined method `metadata' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:46:in `name'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:146
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:140:in `each'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:140
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:136:in `to_xml'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:86
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:85:in `each'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:85
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `call'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures'
from /usr/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb:58:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/test_suite.rb:84:in `to_xml'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/report_manager.rb:18:in `write_report'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/report_manager.rb:17:in `open'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/report_manager.rb:17:in `write_report'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:203:in `write_report'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:207:in `new_suite'
from /usr/lib/ruby/gems/1.8/gems/ci_reporter-1.7.0/lib/ci/reporter/rspec.rb:114:in `example_group_started'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/reporter.rb:19:in `example_group_started'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/reporter.rb:18:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/reporter.rb:18:in `example_group_started'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:115:in `notify'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:96:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in `run_examples'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.2/bin/spec:5
from /usr/bin/rcov:508:in `load'
from /usr/bin/rcov:508
Recording test results
最佳答案
异常是 ci_reporter 中的一个错误,该错误已于 2012 年 2 月 21 日修复(请参阅 https://github.com/nicksieger/ci_reporter/commit/48d7389f19bace8e7765d889bcd4425e3aab699b ),但截至 2012 年 4 月 26 日,该修复不是任何已发布版本的一部分。在它发布之前的解决方案是获取 gem来自github。如果您使用的是 bundler ,请将您的 Gemfile 条目更改为:
gem 'ci_reporter', :git => 'git://github.com/nicksieger/ci_reporter.git'
关于ruby-on-rails - 使用 ci_reporter 运行 Rake rspec 任务时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9674608/
我已经为精炼厂安装了一个博客引擎,它运行良好。 现在我生成了一些表字段更改的迁移(当然不是精炼厂或博客表),但我收到一个错误: == CreateBlogStructure: migrating ==
设置如下: 新建 Rails 应用程序,然后将此 test_rake.rake 放入 lib/tasks 中: task :testclass do HelloClass.hello end` 将
我觉得调用 bundle exec rake 或 bundle exec make 很奇怪:为什么不呢 bundle exec bundle exec rake 然后呢? 虽然我应该能够从 Rakef
我试图更好地了解 rake作品。我在 rake 网站上查看过它是如何工作的,但没有明确解释 rake搜索 Rakefiles 以及它在解决依赖项时所经历的步骤。有人能解释一下如何rake作品? 最佳答
我有一个构建系统,它由几个带有项目的子目录组成,其中每个子目录都有一个单独的 rakiefile(或几个 rakefiles)。没有顶级目录有一个 rakefile,它遍历所有子目录并通过以下方式调用
我想运行一个要求用户输入的 Rake 任务。 我知道我可以在命令行上提供输入,但我想询问用户是否确定他们想要继续执行特定操作,以防他们错误输入所提供的值之一到 Rake 任务。 最佳答案 像这样的东西
我在 this question 中遇到了相同的 heroku rake 问题(据我所知已解决) . 当我尝试修复(包括 require 'rake/dsl_definition' 上面的 requi
如何编写将捆绑安装然后 rake db:migrate 然后 rake db:seed 的 rake 任务。 namespace 'install' do 'bundle install' '
这可能是一种“插上电源了吗?”问题,但是在获得 Ubuntu 11.04 的默认 Rackspace 镜像之后。运行命令(以 root 身份) apt-get 安装 rake 因错误而失败 Readi
花了一些时间没有在 Rails 上编程,现在我“回来了”,事情出了问题。 我安装了 ruby 1.9.2-p0 并坚持使用 rails 3.0.1.Updated 所有 gems 和 bundle
我在让 dotCover 在 Albacore 中工作时遇到一些问题 exec使用相对路径的任务。 @xUnitRunnerPath = Pathname.new('../../Tools/xUnit
我正在尝试执行“rake db:migrate”,它给了我这个错误。 Andy:AcademyAir Andy$ rake db:migrate /Users/Andy/.rvm/gems/ruby-
我的 .bashrc 中有以下命令: alias mfigpdf='for FIG in *.fig; do fig2dev -L pdftex "$FIG" "${FIG%.*}.pdftex";
我希望能够发出命令 rake test:qunit并运行我们的 qunit 测试。这可能吗?可以在不打开浏览器窗口的情况下完成吗? 最佳答案 您可以将 PhantomJS 集成到 rake 中。 Ph
我不是一个 ruby 人,我正在使用 Ember.js 开发一个项目,我正在使用 Rake 管道来编译我的脚本。 # AssetFile $: true concat 'templates.
嗨,我正在做一些编码并试图 rake routes 这个错误信息出来了,我不知道该怎么办 rake aborted! Gem::LoadError: You have already activate
你好,我正在开发一个 rails 应用程序,每次我尝试运行任何 rake 命令时,我都会收到此错误 /usr/local/bin/rake:22:in load': cannot load such
我打电话 bundle exec cap staging demo:foo . demo:foo Cap 任务调用 Rake 任务,打印出 Rails.env . 但是...... Rails 任务正
相关的 travis-ci 构建位于: http://travis-ci.org/#!/NZOI/nztrain/builds/2046207 此时 db:migrate 或 db:test:prep
为什么我收到这个 Rake 错误: $ rake --version /Volumes/Data/sampablokuper/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/
我是一名优秀的程序员,十分优秀!