Closed jasonfb closed 3 years ago
My experience suggests that yes, you need to require
it.
normally it should be loaded if require: true
is in the Gemfile but it seems like this effect is somehow caused by Appraisal
Huh, interesting! Do you have an example project I could look at?
you can take a look at the gem I was developing, using Appraisal to test the gem code:
scroll to the bottom of the readme page and look for "The Internal Specs" for the quick setup needed to run Appraisal on this particular project.
Hmm, I don't seem to be able to replicate this. Running:
bundle exec rspec spec/lib/universal_track_manager/models/visit_spec.rb
bundle exec appraisal rails-5-1 rspec spec/lib/universal_track_manager/models/visit_spec.rb
with byebug
on line 30 drops me into a shell with both calls. Did you change anything since you opened this issue originally?
Question:
I have a basic spec and am simply trying to debug it with byebug
spec/setup_spec
Gemfile
Appraisals file
when I run appraisal rails-5-0 rake spec I get
however, if I simply throw a
require 'byebug'
at the top of settings_spec.rb then it appears to drop into byebug correctly.is that the expected behavior? the reason I'm asking is because I had thought the gems listed in Gemfile should be available during the appraisal run. Note that I tried this with my Gemfile as both
gem 'byebug'
and alsogem 'byebug', require: true
I should note that I am testing a GEM that has a
.gemspec
file at its root, as well as aGemfile
and also anAppraisals
file