Whenever I try to run my rspec tests (using 'rspec spec' or 'bundle exec rspec spec') I get a huge amount of output on the screen. It seems to be going through every gem in my Gemfile and displaying messages from it. Below is a sample of that output (there was much much more).
Can someone tell me what these messages are and how to stop them from showing every time I want to run tests?
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)>'
See https://github.com/rspec/rspec-core/issues/1571. Basically, recent rspec versions added --warnings
to the .rspec
file by default. This has led to lots of warnings about code in gems being output. The 'fix' for now is to remove the --warnings
line.