blob: 2270584d72f6f5c45fd1cb0e08364f9b4b5b56be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
require_relative 'spec_helper'
describe YARD::MRuby::Handlers::C::Header::FunctionHandler do
it "should register functions" do
header_line <<-eof
MRB_API void mrb_foo( void );
eof
expect(Registry.at('mrb_foo')).not_to be_nil
# puts Registry.send(:thread_local_store).inspect
end
it "should find docstrings attached to functions" do
header_line <<-eof
/* DOCSTRING */
MRB_API void mrb_foo( void );
eof
foo = Registry.at('mrb_foo')
expect(foo.docstring).to eq 'DOCSTRING'
end
end
|