a gem intends to support gems a
or b
as alternatives for a functionality.
In code I check with defined?(A)
if I fall back to b
that's fine.
But as a gem developer how to specify these dependencies?
1) what do I put in the Gemfile.
group :development, :test do
gem 'a', :require => false
gem 'b', :require => false
end
This allows Bundle.require(:test)
not to auto-require a,b?
2) How can explicitly require a
and b
separately to mimic (or mock) the scenario when we fall back to b
in my tests?
3) Also how do I specify that either a
or b
is prerequisite for the gem.
thanks