Closed kivanio closed 1 year ago
It'd be nice to remove the dependency on rspec completely.
How are you including singed in your project? I'm confused how singed/rspec
is loaded because singed
only requires it if RSpec
is defined:
We could remove that line, and add an explicit configuration step to rspec, ie require 'singed/rspec'
.
Ah, I think this is because I have rspec-rails
required but not rspec
[3] pry(main)> defined?(RSpec)
=> "constant"
[4] pry(main)> RSpec.configure
NoMethodError: undefined method `configure' for RSpec:Module
from (pry):3:in `__pry__'
[5] pry(main)> Object.const_source_location('RSpec')
=> ["/Users/amirsharif/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/rspec-rails-6.0.1/lib/rspec/rails/feature_check.rb",
1]
[6] pry(main)>
I removed this from my Gemfile and it works. Perhaps we check for the configure
via respond_to
or just do nothing.
Same here
I only require rspec-rails
at my Rails app
It needs to clarify at README that in projects with rspec, the
gem 'singed'
needs to be at same group asrspec
gem in your Gemfile.Otherwise you get this: