[Ironruby-core] Formatting the test result in Spec

Mohammad Azam lists at ruby-forum.com
Mon Jul 6 16:32:14 EDT 2009


I changed the code to this but still not picking up the test:

describe PrimeService,"when 1 is passed to the prime service" do

it "should return true" do

primeService = PrimeService.new
primeService.IsPrime(1).should == true

end


Mohammad Azam wrote:
> I got the Spec working in IronRuby! Thanks everyone.
> 
> How can I get a detailed report (command line) when running the test?
> 
> Currently, I only get the following:
> 
> 
> C:\Projects\FirstLookAtIronRuby\FirstLookAtIronRuby\TestSuite>ir
> test_prime.rb
> Loaded suite test_prime
> Started
> 
> Finished in 0.015625 seconds.
> 
> 0 tests, 0 assertions, 0 failures, 0 errors
> 
> Also, for some reason it says "0 tests" here is my test_prime.rb file:
> 
> require 'test/unit'
> require 'rubygems'
> require 'spec'
> 
> require File.dirname(__FILE__) + '/bin/Debug/BusinessObjects.dll'
> 
> include BusinessObjects
> include Test::Unit
> 
> describe PrimeService,"when 1 is passed to the prime service" do
> 
> it "should return true" do
> 
> primeService = PrimeService.new
> primeService.IsPrime(1)
> 
> end
> 
> end

-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list