I=92m looking for a unit test system to test module methods. Testing I have=
 done in the past with Rspec and Minitest have always been in the context o=
f instantiating a class and testing the instance. To test a module, they ap=
pear to require that you include the module you want to test into a class a=
nd test the class. I want to just test module methods in isolation. =


For example, given the module:

    module A
      extend self

      def add(x, y)
        x + y
      end

    end

I=92d like to test with something like this:

    assert(4, A.add(3, 1))

or

    test(A.add(3, 1), expect: 4)

I know I can write this scenario quickly but I=92d like other test types an=
d test run reporting.

It=92s quite possible that the existing test systems can do this but I have=
 not discovered a good way to go about it. Any pointers would be appreciate=
d.

Thanks,

Dan






Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>