summaryrefslogtreecommitdiff
path: root/spec/coderay_spec.rb
blob: 8a299b3c4dc42249321b783ea7d62918f36d1cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require File.expand_path('../spec_helper', __FILE__)

RSpec.describe CodeRay do
  describe '::VERSION' do
    it "returns the Gem's version" do
      expect(CodeRay::VERSION).to match(/\A\d\.\d\.\d?\z/)
    end
  end

  describe '.coderay_path' do
    it 'returns an absolute file path to the given code file' do
      base = File.expand_path('../..', __FILE__)
      expect(CodeRay.coderay_path('file')).to eq("#{base}/lib/coderay/file")
    end
  end
end