Skip to content

Commit 8d25b72

Browse files
committed
add spec for CodeRay.coderay_path
1 parent 77734f6 commit 8d25b72

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec/coderay_spec.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
require File.expand_path('../spec_helper', __FILE__)
22

33
RSpec.describe CodeRay do
4-
describe 'version' do
4+
describe '::VERSION' do
55
it "returns the Gem's version" do
66
expect(CodeRay::VERSION).to match(/\A\d\.\d\.\d?\z/)
77
end
88
end
9+
10+
describe '.coderay_path' do
11+
it 'returns an absolute file path to the given code file' do
12+
base = File.expand_path('../..', __FILE__)
13+
expect(CodeRay.coderay_path('file')).to eq("#{base}/lib/coderay/file")
14+
end
15+
end
916
end

0 commit comments

Comments
 (0)