File: rspec_helper.rb

package info (click to toggle)
ruby-versionist 2.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 244 kB
  • sloc: ruby: 798; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Versionist
  module RspecHelper
    # Gets the name of the helper file to require in spec files
    # Accounting for rspec-rails 2 vs rspec-rails 3
    def rspec_helper_filename
      if File.exists? "spec/rails_helper.rb"
        "rails_helper"
      else
        "spec_helper"
      end
    end
  end
end