Sha256: b56595fed7afd50397c97652fe45b1a244fd30abade2a84a0b12d3852e44b07f

Contents?: true

Size: 899 Bytes

Versions: 4

Compression:

Stored size: 899 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
    p IO.popen(simple_load, err: [:child, :out]).readline
    IO.popen(simple_load, err: [:child, :out]).readline.strip.should == 'OK'
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
picky-4.24.0 spec/lib/picky_spec.rb
picky-4.23.2 spec/lib/picky_spec.rb
picky-4.23.1 spec/lib/picky_spec.rb
picky-4.23.0 spec/lib/picky_spec.rb