How to TDD in Ruby using Eclipse on Windows -


how tdd following snippet in ruby using eclipse on windows?

class passintegers   def addition(i,j)     k = i+j   end end 

install test-unit executing gem install test-unit

run following snippet 2 ruby test

require 'test/unit'  require 'passintegers' class testpassintegers < test::unit::testcase     def test_pass_integers       passintegers = passintegers.new       expected = passintegers.addition 3,2       assert_equal expected, 5     end end 

ruby-test-eclipse

possible issue

if following error occurs @ eclipse console:

c:/dev/tools/eclipse/configuration/org.eclipse.osgi/bundles/965/1/.cp/testing/dltk-testunit-runner.rb:252:in `block in <top (required)>': uninitialized constant test::unit::ui::silent (nameerror) 

open c:\dev\tools\eclipse\configuration\org.eclipse.osgi\bundles\965\1\.cp\testing\dltk-testunit-runner.rb , solve commenting

#autorunner.output_level = test::unit::ui::silent 

and adding

autorunner.runner_options[:output_level] = test::unit::ui::console::outputlevel::silent 

and run test again.

solution solve uninitialized constant test::unit::ui::silent (nameerror) issue found @ http://blog.christopherkaiser.de/?p=319


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -