Cucumber and custom RSpec matchers

☆樱花仙子☆ 提交于 2019-12-13 01:34:26

问题


I'm trying to write a custom RSpec matcher for cucumber. I require cucumber/rails/rspec in env.rb, but I still get "uninitialized constant Spec::Matchers" error. I'm using latest versions of Rspec, Cucumber and CucumberRails. What am I missing?

P.S. Same matcher works fine with pure RSpec...


回答1:


Are you using RSpec 2? The correct constant is now RSpec::Matchers for that. Defined in rspec/matchers.

If you're not, then perhaps you haven't required spec/matchers which defines the Spec::Matchers constant for RSpec < 2.



来源:https://stackoverflow.com/questions/4446338/cucumber-and-custom-rspec-matchers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!