summaryrefslogtreecommitdiff
path: root/spec/path_spec.rb
blob: 8d0ca473126f2f080ef653a3d7d88f9f36b2800d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "spec_helper"

describe "when testing path helpers" do
  it "should define Libyajl2::VENDORED_LIBYAJL2_DIR" do
    expect(Libyajl2::VENDORED_LIBYAJL2_DIR).to include("lib/libyajl2/vendored-libyajl2")
  end

  it "should define Libyajl2.opt_path" do
    expect(Libyajl2.opt_path).to include("lib/libyajl2/vendored-libyajl2/lib")
  end

  it "should define Libyajl2.include_path" do
    expect(Libyajl2.include_path).to include("lib/libyajl2/vendored-libyajl2/include")
  end

  %w{yajl_common.h yajl_gen.h yajl_parse.h yajl_tree.h yajl_version.h}.each do |hdr|
    it "should copy the #{hdr} header file to the gem path" do
      expect(File.exist?(File.join(Libyajl2.include_path, "yajl", hdr))).to be_truthy
    end
  end
end