summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2019-11-24 16:21:29 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2019-11-24 16:21:29 +0100
commit8d25b7227f3eb3efb92de2d2ff57e83aed47e8b6 (patch)
tree38d38cc043c38ced1d6df56da897583b39f12233
parent77734f6cfa1d90b80c53ac71c880dc5978e58dd7 (diff)
downloadcoderay-8d25b7227f3eb3efb92de2d2ff57e83aed47e8b6.tar.gz
add spec for CodeRay.coderay_path
-rw-r--r--spec/coderay_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/coderay_spec.rb b/spec/coderay_spec.rb
index 2c7b91e..8a299b3 100644
--- a/spec/coderay_spec.rb
+++ b/spec/coderay_spec.rb
@@ -1,9 +1,16 @@
require File.expand_path('../spec_helper', __FILE__)
RSpec.describe CodeRay do
- describe 'version' 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