如何停止RSpec警告消息

约翰·C

我刚刚开始学习在我的rails应用程序上使用RSpec。一切似乎都正常,但是当我运行时rspec spec,会得到页面和我认为是皮棉消息的页面。

我不在乎那些引用我的代码的人,但是其中很多引用了我正在使用的Gems。我真的无法解决这些问题。

如何将RSpec配置为仅将lint应用于我的代码,而不应用于外部Gems?

这是一个小样本。我得到了2000行以上的东西。

/Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/gems/sorcery-0.8.5/lib/sorcery/model.rb:265: warning: method redefined; discarding old username_attribute_names=
/Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251: warning: loading in progress, circular require considered harmful - /Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/gems/sorcery-0.8.5/lib/sorcery.rb
    from /Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
    from /Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/bin/rspec:23:in `<main>'
    from /Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/bin/rspec:23:in `load'
    from /Users/jcreasey/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-3.0.0/exe/rspec:4:in `<top (required)>'
    from /Users/jcreasey

这是我的.rspec文件

-color
--warnings
--require spec_helper
被杀

如果您有/.rspec文件删除--warning选项。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在rspec中使用sidekiq禁用警告消息

来自分类Dev

如何mutate()-警告消息

来自分类Dev

停止Windows服务并避免超时警告消息

来自分类Dev

如何停止logcat消息

来自分类Dev

如何提醒PHP警告消息?

来自分类Dev

如何停止IntelliSense PCH警告?

来自分类Dev

安装R后如何摆脱警告消息?

来自分类Dev

加载库时如何隐藏警告消息?

来自分类Dev

如何跳过symfony2警告消息

来自分类Dev

如何摆脱GPT-2警告消息?

来自分类Dev

如何绕过此Powershell警告消息?

来自分类Dev

如何隐藏来自特定命令的警告消息?

来自分类Dev

如何停止没有DefinitelyTyped的函数的警告?

来自分类Dev

如何让 QT Creator 停止记录警告异常?

来自分类Dev

加载时如何停止打包消息?

来自分类Dev

如何停止临时接收消息的交换/队列?

来自分类Dev

如何停止接收LWT保留消息?

来自分类Dev

如何防止Android显示应用停止消息

来自分类Dev

在运行Ruby 2.7.0时如何抑制RSpec中的警告

来自分类Dev

如何测试类是否在RSpec中收到消息?

来自分类Dev

如何在rspec中同时传递对象和消息?

来自分类Dev

如何停止RSpec / Capybara中的App Transport Security错误

来自分类Dev

如何避免wilcox.test中的警告消息

来自分类Dev

如何在底部禁用反应本机警告消息

来自分类Dev

我如何在Odoo网站上发出警告消息

来自分类Dev

如何在React Native中复制警告消息

来自分类Dev

如何从T-SQL过程传递警告消息?

来自分类Dev

加载gdata包时如何解决Perl警告消息?

来自分类Dev

如何禁用vscode(python)上的pylint警告和消息?