A gem must be part of a code that acts autonomously. Otherwise, it is part of the application, so tests should also be autonomously created. Thus, others (hypothetically) may also perform tests. If the tests depend on your application, others cannot test your gem.
In addition, if you want to test your stone, it should not fail, because your application fails. After your gem has passed the test, you can check the application, knowing that your gem is working well (provided that you have tested everything).
Whether this stone is Rails dependent or not is not a problem since Rails has also been tested (and you can assume that it works correctly). Thus, these dependencies do not (/ should) affect your gem.
Veger
source share