Sha256: 3dc7390cbd95c2105f19c606c7edc62e4a563e2c96be93a5e304a258dd25266c

Contents?: true

Size: 671 Bytes

Versions: 3

Compression:

Stored size: 671 Bytes

Contents

unless defined? JRUBY_VERSION
  exit
end

$: << File.expand_path( '../../lib', __FILE__ )

$CLASSPATH << File.dirname(__FILE__)

require 'lookout/jruby'
require 'yaml'

describe YAML do

  let( :expected ) { { 'hello' => 'world' } }

  it 'is not patched for jruby-9k' do
    if JRUBY_VERSION.start_with?('9.')
      expect( YAML.respond_to?(:_load_file) ).to be false
    end
  end

  it 'loads file from filesystem' do
    data = YAML.load_file(File.expand_path('../some.yml', __FILE__))
    expect( data ).to eq expected
  end

  it 'loads file from classloader' do
    data = YAML.load_file('uri:classloader:/some.yml')
    expect( data ).to eq expected
  end

end
 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lookout-jruby-2.4.0 spec/yaml_spec.rb
lookout-jruby-2.3.0 spec/yaml_spec.rb
lookout-jruby-2.2.0 spec/yaml_spec.rb