Sha256: 3c4be94a000c1ab4be6edb999934ff9624328a397e7e7ba649b30ef3f6cbe500

Contents?: true

Size: 639 Bytes

Versions: 16

Compression:

Stored size: 639 Bytes

Contents

require File.expand_path('../rails', __FILE__)

module TestHelper
  module RailsRSpec
    include Rails

    def path
      File.join(project.directory, 'spec/spec_helper.rb')
    end

    def start_of_requires
      if project.rails_version == 2
        Regexp.new(Regexp.escape(%q!require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))!))
      else
        Regexp.new(
          Regexp.escape('require File.expand_path(') +
          %q/(?:"|')/ +
          Regexp.escape('../../config/environment') +
          %q/(?:"|')/ +
          Regexp.escape(', __FILE__)')
        )
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rr-3.1.1 spec/support/test_helper/rails_rspec.rb
rr-3.1.0 spec/support/test_helper/rails_rspec.rb
rr-3.0.9 spec/support/test_helper/rails_rspec.rb
rr-3.0.8 spec/support/test_helper/rails_rspec.rb
rr-3.0.7 spec/support/test_helper/rails_rspec.rb
rr-3.0.6 spec/support/test_helper/rails_rspec.rb
rr-3.0.5 spec/support/test_helper/rails_rspec.rb
rr-3.0.4 spec/support/test_helper/rails_rspec.rb
rr-3.0.3 spec/support/test_helper/rails_rspec.rb
rr-3.0.2 spec/support/test_helper/rails_rspec.rb
rr-3.0.1 spec/support/test_helper/rails_rspec.rb
rr-3.0.0 spec/support/test_helper/rails_rspec.rb
rr-1.2.1 spec/support/test_helper/rails_rspec.rb
rr-1.2.0 spec/support/test_helper/rails_rspec.rb
rr-1.1.2 spec/support/test_helper/rails_rspec.rb
rr-1.1.2.rc1 spec/support/test_helper/rails_rspec.rb