Cucumber and custom RSpec matchers

2019-07-29 06:12发布

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条回答
2楼-- · 2019-07-29 06:52

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.

查看更多
登录 后发表回答