Sha256: f989a97fc33bad459e5e5618bdb7e7935af7d7bde94db436672b6be4032d7fc9

Contents?: true

Size: 841 Bytes

Versions: 9

Compression:

Stored size: 841 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

9 entries across 9 versions & 1 rubygems

Version Path
picky-4.27.1 spec/lib/picky_spec.rb
picky-4.27.0 spec/lib/picky_spec.rb
picky-4.26.2 spec/lib/picky_spec.rb
picky-4.26.1 spec/lib/picky_spec.rb
picky-4.26.0 spec/lib/picky_spec.rb
picky-4.25.3 spec/lib/picky_spec.rb
picky-4.25.2 spec/lib/picky_spec.rb
picky-4.25.1 spec/lib/picky_spec.rb
picky-4.25.0 spec/lib/picky_spec.rb