So, when we use this gem with spring I get an undefined method 'when' for #<RSpec::Matchers::Has:0x007fc965690560> error when using the #when method. It works fine when I don't use spring. I followed the directions in README.md (basically just added the gem to Gemfile and adding require 'valid_attribute' to spec_helper.rb)
I found 2 ways to work around it:
Requiring valid_attribute/rspec instead of valid_attribute in spec_helper
Second way was to add a require: false at the end of the gem in Gemfile
Would be awesome if you could find out why this is happening.
So, when we use this gem with spring I get an
undefined method 'when' for #<RSpec::Matchers::Has:0x007fc965690560>error when using the#whenmethod. It works fine when I don't use spring. I followed the directions in README.md (basically just added the gem toGemfileand addingrequire 'valid_attribute'tospec_helper.rb)I found 2 ways to work around it:
Requiring
valid_attribute/rspecinstead ofvalid_attributein spec_helperSecond way was to add a
require: falseat the end of the gem inGemfileWould be awesome if you could find out why this is happening.