I have done this before but for some reason this is failing:
require 'rubygems'
require 'spec'
require File.dirname(__FILE__) + '/bin/Debug/BusinessObjects.dll'
include BusinessObjects
describe PrimeService do
it "should return false when 1 is passed" do
@primeService = PrimeService.new
@primeService.IsPrime(1).should == false
end
end
And here is error:
C:\Projects\ILoveIronRuby\ILoveIronRuby\ILoveIronRubyConsole>spec
test_prime_no_
spec.rb
./bin/Debug/BusinessObjects.dll: 127: The specified procedure could not be
found
. - Init_BusinessObjects (LoadError)
./bin/Debug/BusinessObjects.dll from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/cus
tom_require.rb:31:in `require'
from ./test_prime_no_spec.rb:4
from
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_
group_runner.rb:15:in `load'
from
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_
group_runner.rb:15:in `load_files'
from
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_
group_runner.rb:14:in `each'
from
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_
group_runner.rb:14:in `load_files'
from
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/options.
rb:107:in `run_examples'
from
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/command_
line.rb:9:in `run'
from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4
from c:/ruby/bin/spec:19:in `load'
from c:/ruby/bin/spec:19
When I use simple Test::Unit::TestCase then it works fine and loads the
BusinessObjects.dll!
--
Mohammad Azam
MVP (Microsoft Valuable Professional)
www.highoncoding.com
www.azamsharp.com
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core