开发者

Cucumber and custom RSpec matchers

开发者 https://www.devze.com 2023-01-30 10:00 出处:网络
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 la开发者_如何转开发test

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 la开发者_如何转开发test versions of Rspec, Cucumber and CucumberRails. What am I missing?

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消