NoMethodError:在Rails控制台中运行Capybara测试时,未定义方法`color_enabled =' [英] NoMethodError: undefined method `color_enabled=' when run capybara test in rails console

查看:65
本文介绍了NoMethodError:在Rails控制台中运行Capybara测试时,未定义方法`color_enabled ='的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NoMethodError: undefined method `color_enabled='  for #<RSpec::Core::Configuration:0x007ff1ba922ad0> 
from /Users/apple/.rvm/gems/ruby-2.0.0-p247@global/gems/rspec-console-0.2.7/lib/rspec-console/config_cache.rb:69:in `method_missing'

我不知道如何解决〜

有什么建议吗? thx〜

any suggestion? thx~

推荐答案

设置后

gem'rspec-rails' ,'〜> 2.14.2'
gem'rspec-console','〜> 0.2.7'

gem 'rspec-rails', '~> 2.14.2' gem 'rspec-console', '~> 0.2.7'

一切正常,我认为这个问题是rspec和rspec-console版本存在冲突问题。可能与 https://github.com/nviennot/rspec-console/pull/ 14

everything work fine, I think this issue is rspec and rspec-console version conflict problem. Maybe it is related to https://github.com/nviennot/rspec-console/pull/14 .

这篇关于NoMethodError:在Rails控制台中运行Capybara测试时,未定义方法`color_enabled ='的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆