Sha256: e691b6c55edc7402f8f8f4e270213f0973122fcbb7bd66740772dbb250a266a4

Contents?: true

Size: 846 Bytes

Versions: 5

Compression:

Stored size: 846 Bytes

Contents

require 'spec_helper'

describe Picky do

  it 'sets the right internal encoding' do
    Encoding.default_external.should == Encoding::UTF_8
  end
  # THINK What to set default external encoding to?
  #
  # it 'sets the right external encoding' do
  #   Encoding.default_internal.should == Encoding::UTF_8
  # end
  
  it 'loads in a simple ruby environment with the defined requirements' do
    #TODO Picky.root is set to /spec/temp in spec_helper, so is this the "best" way?
    load_path   = File.expand_path('../../../lib', __FILE__)
    ruby        = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']).sub(/.*\s.*/m, '"\&"')

    simple_load = <<-COMMAND
      #{ruby} -I #{load_path} -r picky -e "puts 'OK'"
    COMMAND
    
    IO.popen(simple_load, err: [:child, :out]).readline.strip.should == 'OK'
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
picky-4.22.0 spec/lib/picky_spec.rb
picky-4.21.2 spec/lib/picky_spec.rb
picky-4.21.1 spec/lib/picky_spec.rb
picky-4.21.0 spec/lib/picky_spec.rb
picky-4.20.2 spec/lib/picky_spec.rb