I need to create some methods that are available both to my application (models, views and controllers) and to RSpec.
Specifically I need to create some path_helper
You can make RSpec include a module by (in spec/spec_helper.rb):
RSpec.configure do |config| config.include YourModule end
If you want to use routing path helpers, you can include them like this:
RSpec.configure do |config| config.include Rails.application.routes.url_helpers end