search for: public_class_method

Displaying 4 results from an estimated 4 matches for "public_class_method".

Did you mean: public_class_methods
2007 Mar 06
15
mocking missing methods
Hi folks. So I''m using mocha on a ruby project, and I really like it. One thing I''ve noticed is that it can be a bit "surprising" when I''m mocking methods that don''t exist on an object, and I think there''s an easyish fix. At the moment, you use sheep = mock() to create a mock sheep. What I''d like to do is something like sheep =
2006 Dec 14
3
Stubbing constructiors
...res, 1 errors Routing around the problem is possible: require ''test/unit'' require ''stubba'' class X def X.initialize( stuff ) end end class XTest < Test::Unit::TestCase def test_ X.stubs(:initialize).with("bla") X.public_class_method :initialize X.initialize("bla") end end ...however a bit awkward... :-) *t ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
2012 Sep 22
4
Class, Module, Object
>> reload! Reloading... => true >> puts Class < Module true => nil >> puts Module < Class false => nil >> puts Module < Object true => nil >> puts Object < Module false => nil >> Object.parent => Object The above indicates that the Class object instance inherits from the Module object instance and the Module object instance
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde