summaryrefslogtreecommitdiff
path: root/spec/ffi/struct_callback_spec.rb
diff options
context:
space:
mode:
authortduehr <tduehr@gmail.com>2014-01-21 15:50:23 -0600
committertduehr <tduehr@gmail.com>2014-06-05 21:33:39 -0500
commitc79e9f5d1a622751226b82e302e20f734c1a4291 (patch)
tree385eb2ad96a1f399b80b14e2ffa38cba00f3a23d /spec/ffi/struct_callback_spec.rb
parent3223054a9400ba356bf38ffe606ac58210319888 (diff)
downloadffi-c79e9f5d1a622751226b82e302e20f734c1a4291.tar.gz
merge specs w/ JRuby and correct syntax to use rspec
Diffstat (limited to 'spec/ffi/struct_callback_spec.rb')
-rw-r--r--spec/ffi/struct_callback_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ffi/struct_callback_spec.rb b/spec/ffi/struct_callback_spec.rb
index 8ba9773..5fc1b38 100644
--- a/spec/ffi/struct_callback_spec.rb
+++ b/spec/ffi/struct_callback_spec.rb
@@ -3,7 +3,8 @@
# For licensing, see LICENSE.SPECS
#
-require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
+require 'ffi'
+require_relative 'spec_helper'
describe FFI::Struct, ' with inline callback functions' do
it 'should be able to define inline callback field' do
@@ -19,7 +20,7 @@ describe FFI::Struct, ' with inline callback functions' do
end
attach_function :struct_call_add_cb, [TestStruct, :int, :int], :int
attach_function :struct_call_sub_cb, [TestStruct, :int, :int], :int
- end
+ end.should be_an_instance_of FFI::Function
end
it 'should take methods as callbacks' do
module CallbackMember2