Ruby on rails RSpec加载所有gem文件

Ruby on rails RSpec加载所有gem文件,ruby-on-rails,rspec,rspec-rails,Ruby On Rails,Rspec,Rspec Rails,每当我尝试运行rspec测试(使用“rspec spec”或“bundle exec rspec spec”)时,屏幕上都会显示大量的输出。它似乎正在浏览我的gem文件中的每一个gem并显示来自它的消息。下面是该输出的示例(还有更多) 有人能告诉我这些消息是什么,以及如何在每次运行测试时阻止它们显示吗 C:/Ruby193/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/network/delivery_methods /sendmail.rb:53:

每当我尝试运行rspec测试(使用“rspec spec”或“bundle exec rspec spec”)时,屏幕上都会显示大量的输出。它似乎正在浏览我的gem文件中的每一个gem并显示来自它的消息。下面是该输出的示例(还有更多)

有人能告诉我这些消息是什么,以及如何在每次运行测试时阻止它们显示吗

C:/Ruby193/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/network/delivery_methods
/sendmail.rb:53: warning: shadowing outer local variable - to
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-rails-3.0.1/lib/rspec/rails/matchers/h
ave_http_status.rb:87: warning: assigned but unused variable - _ignored
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-rails-3.0.1/lib/rspec/rails/matchers/h
ave_http_status.rb:142: warning: assigned but unused variable - _ignored
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-rails-3.0.1/lib/rspec/rails/matchers/h
ave_http_status.rb:257: warning: assigned but unused variable - _ignored
C:/Ruby193/lib/ruby/gems/1.9.1/gems/holidays-1.0.6/lib/holidays.rb:361: warning:
 assigned but unused variable - e
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business_time-0.7.3/lib/business_time/config
.rb:76: warning: method redefined; discarding old end_of_workday
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business_time-0.7.3/lib/business_time/config
.rb:31: warning: previous definition of end_of_workday was here
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business_time-0.7.3/lib/business_time/config
.rb:85: warning: method redefined; discarding old beginning_of_workday
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business_time-0.7.3/lib/business_time/config
.rb:31: warning: previous definition of beginning_of_workday was here
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business_time-0.7.3/lib/business_time/config
.rb:94: warning: method redefined; discarding old work_week=
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business_time-0.7.3/lib/business_time/config
.rb:34: warning: previous definition of work_week= was here
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.1.1/lib/active_support/depen
dencies.rb:247: warning: loading in progress, circular require considered harmfu
l - C:/Ruby193/lib/ruby/gems/1.9.1/gems/haml-4.0.5/lib/haml/template.rb
        from C:/Ruby193/bin/rspec:23:in `<main>'
        from C:/Ruby193/bin/rspec:23:in `load'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.2/exe/rspec:4:in
 `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/mail-2.5.4/lib/mail/network/delivery\u方法
/rb:53:警告:隐藏外部局部变量-到
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-rails-3.0.1/lib/rspec/rails/matchers/h
ave_http_状态。rb:87:警告:已分配但未使用的变量-\u已忽略
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-rails-3.0.1/lib/rspec/rails/matchers/h
ave_http_status.rb:142:警告:已分配但未使用的变量-\u已忽略
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-rails-3.0.1/lib/rspec/rails/matchers/h
ave_http_status.rb:257:警告:已分配但未使用的变量-\u已忽略
C:/Ruby193/lib/ruby/gems/1.9.1/gems/holidays-1.0.6/lib/holidays.rb:361:警告:
已分配但未使用的变量-e
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business\u time-0.7.3/lib/business\u time/config
.rb:76:警告:重新定义方法;丢弃旧的工作日结束日
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business\u time-0.7.3/lib/business\u time/config
.rb:31:警告:先前对工作日结束的定义在此
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business\u time-0.7.3/lib/business\u time/config
.rb:85:警告:重新定义方法;丢弃旧的工作日开始日
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business\u time-0.7.3/lib/business\u time/config
.rb:31:警告:先前对工作日开始的定义在此
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business\u time-0.7.3/lib/business\u time/config
.rb:94:警告:重新定义方法;放弃旧工作周=
C:/Ruby193/lib/ruby/gems/1.9.1/gems/business\u time-0.7.3/lib/business\u time/config
.rb:34:警告:之前的工作周定义在此
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.1.1/lib/active\u support/depen
密度。rb:247:警告:正在加载,循环要求
l-C:/Ruby193/lib/ruby/gems/1.9.1/gems/haml-4.0.5/lib/haml/template.rb
来自C:/Ruby193/bin/rspec:23:in`'
来自C:/Ruby193/bin/rspec:23:in“加载”
来自C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-3.0.2/exe/rspec:4:in
`'

请参阅。基本上,最新的rspec版本默认情况下在
.rspec
文件中添加了
--warnings
。这导致了大量关于gems中代码输出的警告。现在的“修复”是删除
--warnings
行。

请参阅。基本上,最新的rspec版本默认情况下在
.rspec
文件中添加了
--warnings
。这导致了大量关于gems中代码输出的警告。现在的“修复”是删除
--warnings
行。

谢谢!!所有这些警告真的把我吓坏了。谢谢!!所有这些警告真的把我吓坏了。