每次我运行rspec时,都会遇到此异常
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:290: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/selector/simple_sequence.rb:91: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/selector/simple_sequence.rb:164: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/selector/simple_sequence.rb:207: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/selector/simple_sequence.rb:207: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/functions.rb:2422: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/functions.rb:2554: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/parser.rb:49: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/parser.rb:49: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/parser.rb:376: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/parser.rb:402: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/parser.rb:606: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/script/parser.rb:606: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/scss/parser.rb:512: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-3.4.21/lib/sass/scss/static_parser.rb:65: warning: literal in condition
/home/xander/.rvm/gems/ruby-2.2.4/gems/sass-rails-5.0.4/lib/sass/rails/helpers.rb:6: warning: method redefined; discarding old asset_data_url
/home/xander/.rvm/gems/ruby-2.2.4/gems/sprockets-3.5.2/lib/sprockets/sass_processor.rb:253: warning: previous definition of asset_data_url was here
/home/xander/.rvm/gems/ruby-2.2.4/gems/devise-3.5.6/lib/devise.rb:109: warning: character class has duplicated range: /\A[^@\s]+@([^@\s]+\.)+[^@\W]+\z/
/home/xander/.rvm/gems/ruby-2.2.4/gems/devise-3.5.6/lib/devise/rails/warden_compat.rb:2: warning: method redefined; discarding old request
/home/xander/.rvm/gems/ruby-2.2.4/gems/warden-1.2.6/lib/warden/mixins/common.rb:17: warning: previous definition of request was here
/home/xander/.rvm/gems/ruby-2.2.4/gems/devise-3.5.6/lib/devise/rails/warden_compat.rb:11: warning: method redefined; discarding old reset_session!
/home/xander/.rvm/gems/ruby-2.2.4/gems/warden-1.2.6/lib/warden/mixins/common.rb:38: warning: previous definition of reset_session! was here
/home/xander/.rvm/gems/ruby-2.2.4/gems/pry-rails-0.3.4/lib/pry-rails/commands/find_route.rb:54: warning: shadowing outer local variable - result
/home/xander/.rvm/gems/ruby-2.2.4/gems/factory_girl-4.5.0/lib/factory_girl/definition_proxy.rb:57: warning: `&' interpreted as argument prefix
/home/xander/.rvm/gems/ruby-2.2.4/gems/factory_girl-4.5.0/lib/factory_girl/linter.rb:20: warning: private attribute?
/home/xander/.rvm/gems/ruby-2.2.4/gems/factory_girl-4.5.0/lib/factory_girl/linter.rb:20: warning: private attribute?
/home/xander/.rvm/gems/ruby-2.2.4/gems/devise-3.5.6/lib/devise/rails.rb:50: warning: method redefined; discarding old respond_to?
/home/xander/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.5/lib/action_dispatch/routing/routes_proxy.rb:21: warning: previous definition of respond_to? was here
/home/xander/.rvm/gems/ruby-2.2.4/gems/devise-3.5.6/lib/devise/failure_app.rb:28: warning: method redefined; discarding old default_url_options
/home/xander/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.5/lib/active_support/core_ext/class/attribute.rb:86: warning: previous definition of default_url_options was here
然后测试套件正常完成。在开发中启动Web服务器时,我没有看到错误。
我猜它是宝石或配置中的东西。我重新安装了宝石,甚至尝试更改红宝石版本。我检查了资产文件。跑出去的地方。有什么想法吗?
答案 0 :(得分:2)
当我删除了异常被压扁的选项时,我的协作者已将--warnings
选项添加到.rspec
。