Sha256: f9fdd9cbcb6f4eeb39f4529a4ac7a58d5dc52d6e15cda4c128079dc4ce4b9b71

Contents?: true

Size: 767 Bytes

Versions: 16

Compression:

Stored size: 767 Bytes

Contents

module TestHelper
  module Ruby
    def call
      super
      File.open(path, 'w') do |f|
        content = <<-EOT
          require 'rubygems'
          require 'bundler'
          Bundler.setup
          Bundler.require(:default)
        EOT

        requires = project.requires_with_rr(@requires)
        require_lines = project.require_lines(requires).
          map { |str| "#{str}\n" }.
          join
        content << "\n" + require_lines + "\n"

        content << @prelude

        if RR.debug?
          puts "~ Content of #{File.basename(path)} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
          puts content
          puts "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
        end

        f.write(content)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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