Sha256: 746fa978c052ed7263e256d71092e4cf82d0ced13ac3ce5d918b7eb29696e341

Contents?: true

Size: 531 Bytes

Versions: 4

Compression:

Stored size: 531 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

context "Extension with globally available functions" do

  specify "should make functions available" do
    Extension.new "functions" do |e|
      e.sources full_dir("headers/functions.h")
      e.namespace "functions"
    end

    require 'functions'

    should.not.raise NameError do
      test1
    end

    should.not.raise NameError do
      assert_in_delta 1.0, test2(2.0), 0.001
    end

    should.not.raise NameError do
      test3(2, 4.2).should == 2
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rbplusplus-0.9 test/functions_test.rb
rbplusplus-0.1.1 test/functions_test.rb
rbplusplus-0.1 test/functions_test.rb
rbplusplus-0.8 test/functions_test.rb