[DRE-commits] r2862 - packages/libmocha-ruby/trunk/debian

terceiro-guest at alioth.debian.org terceiro-guest at alioth.debian.org
Sun Jun 29 20:26:38 UTC 2008


Author: terceiro-guest
Date: 2008-06-29 20:26:37 +0000 (Sun, 29 Jun 2008)
New Revision: 2862

Added:
   packages/libmocha-ruby/trunk/debian/test.rb
Log:
adding a simple test case to ensure that basic mocha funcionality is working. This test must be run after the package is installed.



Added: packages/libmocha-ruby/trunk/debian/test.rb
===================================================================
--- packages/libmocha-ruby/trunk/debian/test.rb	                        (rev 0)
+++ packages/libmocha-ruby/trunk/debian/test.rb	2008-06-29 20:26:37 UTC (rev 2862)
@@ -0,0 +1,18 @@
+require 'test/unit'
+require 'mocha'
+
+class MochaDebianTest < Test::Unit::TestCase
+
+  def test_should_create_mock_objects
+    obj = mock
+    obj.expects(:something).returns("something")
+    assert_equal "something", obj.something
+  end
+
+  def test_should_mock_real_objects
+    obj = Object.new
+    obj.expects(:data).returns(:x => 7, :y => 9)
+    assert_equal({ :x => 7, :y => 9}, obj.data)
+  end
+
+end




More information about the Pkg-ruby-extras-commits mailing list