ruby-on-rails – 不推荐使用Guard Rspec:cli选项,更改为:cmd
发布时间:2020-12-17 01:37:10 所属栏目:百科 来源:网络整理
导读:在我的rails应用程序中使用Guardfile 警卫’rspec’,all_after_pass:false,cli:’ – drb’做 不工作Guardfile guard’rspec’,cmd:’ – drb’可以 我已经多次用捆绑执行警卫打开警卫,但我发现即使我收到此消息 Guard :: RSpec DEPRECATION警告:不推荐
在我的rails应用程序中使用Guardfile
警卫’rspec’,all_after_pass:false,cli:’ – drb’做 不工作Guardfile guard’rspec’,cmd:’ – drb’可以 我已经多次用捆绑执行警卫打开警卫,但我发现即使我收到此消息 终端输出:cli 01:49:14 - WARN - Guard::RSpec DEPRECATION WARNING: The :cli option is deprecated. Please customize the new :cmd option to fit your need. 01:49:15 - INFO - Guard is using Growl to send notifications. 01:49:15 - INFO - Guard is using Emacs to send notifications. 01:49:15 - INFO - Guard is using TerminalTitle to send notifications. 01:49:15 - INFO - Starting Spork for RSpec Using RSpec,Rails Preloading Rails environment Loading Spork.prefork block... Spork is ready and listening on 8989! 01:49:17 - INFO - Spork server for RSpec successfully started 01:49:17 - INFO - Guard::RSpec is running 01:49:17 - INFO - Guard is now watching at '/Users/me/rails_projects/mvp' [1] guard(main)> 01:49:18 - INFO - Run all 01:49:18 - INFO - Running all specs Running tests with args ["--color","--failure-exit-code","2","--format","progress","Guard::RSpec::Formatter","--require","/Users/me/.rvm/gems/ruby-2.1.0@rails40/gems/guard-rspec-4.2.4/lib/guard/rspec/formatter.rb","spec"]... ...................................................................... Finished in 0.76464 seconds 70 examples,0 failures Randomized with seed 47137 Done. 终端输出:cmd bundle exec guard 01:58:55 - INFO - Guard is using Growl to send notifications. 01:58:55 - INFO - Guard is using Emacs to send notifications. 01:58:55 - INFO - Guard is using TerminalTitle to send notifications. 01:58:55 - INFO - Starting Spork for RSpec Using RSpec,Rails Preloading Rails environment Loading Spork.prefork block... Spork is ready and listening on 8989! 01:58:57 - INFO - Spork server for RSpec successfully started 01:58:57 - INFO - Guard::RSpec is running 01:58:57 - INFO - Guard is now watching at '/Users/me/rails_projects/mvp' [1] guard(main)> 01:58:59 - INFO - Run all 01:58:59 - INFO - Running all specs [2] guard(main)> 离开:cli还是有解决方案? 解决方法
:cmd需要执行自定义的内容以满足我的需求.正如@sevenseacat所说,“你没有根据自己的需要定制它 – 你只是将cli复制到cmd并期望它能够工作”
我正在运行Spork,Guard和Rspec进行测试.而不是只写–drb我应该在它前面添加rspec 固定Guardfile有 guard’rspec’,cmd:’rspec –drb’do (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |