Displaying 3 results from an estimated 3 matches for "acts_as_fox".
2005 Dec 29
3
Why do plugins use class_eval?
...le Acts #:nodoc:
module Fox #:nodoc:
def self.included(base)
base.extend(ClassMethods)
end
# declare the class level helper methods which
# will load the relevant instance methods
# defined below when invoked
module ClassMethods
def acts_as_fox
class_eval do
extend Foo::Acts::Fox::SingletonMethods
end
end
......
Why is the class_eval needed here in acts_as_fox? Here self is the module that
called acts_as_fox, which I''ve tested by adding a ''puts self.name'' in
acts_a...
2008 Dec 03
5
How to test a plugin
Guys,
I''ve created a plugin, i wanna put my automated test there.
However, I got bad file descriptor error when i run the test like normal
unit test file:
"ruby plugins/acts_as_fox/test/acts_as_fox_test.rb"
How to test a plugin?
Also, is it right to say that I should only put my unit tests (but not
functional test for example) for the plugin in the plugin test folder?
<code for acts_as_fox_test.rb>
require File.join(File.dirname(__FILE__), ''test_helpe...
2005 Nov 04
0
after_find callback in an acts_as plugin
Hi,
I am thinking about writing an acts_as_fox plugin that defines an
after_find callback method. If I do this what will happen if a user
creates a model that acts_as_fox but this model has it''s own
after_find callback method? I imagine that the model''s after_find
method shadows the plugin''s after_find. Presumably bot...