search for: add_discovery

Displaying 3 results from an estimated 3 matches for "add_discovery".

2007 Aug 08
5
and_yield + instance_eval(&block)
I have the following code, which yields instance eval''s the block given: class Foo def bar(&blk) instance_eval &blk end def baz yield end end The effect of this is that self is reassigned: Foo.new.bar do # here, self is the instance of Foo # created by new end But normally self is the object in which Foo.new.bar {...} occurs. Foo.new.baz do
2010 Mar 14
2
autotest & rspec2
Hi guys, I''m trying to find some information on how to get autotest to run the rspec2 tests. I have my project setup so "rake spec" runs the specs properly, but autotest seems to ignore/don''t know that there are specs to test. I read on the rspec2 wiki that autotest integration is o be added eventually. Any ideas on how to achieve this? Thanks, Jeroen
2007 Aug 14
0
Using rspec in a non-rails project w/ autotest
Not sure if anyone needs this, but I have successfully been running rspec/trunk with autotest for a few days now on a non-rails project. The process is pretty simple: 1. Put rspec into vendor/plugins/rspec (on externals, or simply frozen) 2. Add autotest/discover.rb: Autotest.add_discovery do "myproj" end 3. Add autotest/myproj.rb: require File.dirname(__FILE__) + "/../vendor/plugins/rspec/rspec/lib/ autotest/rspec" class Autotest::Myproj < Autotest::Rspec alias :old_spec_commands :spec_commands def spec_commands [File.dirname(__FILE__) + &qu...