On May 4, 2007, at 3:29 PM, Brian Takita wrote:

> A couple days ago I submitted a patch, that was committed by Ezra,  
> to the MrBlog project for the Rspec on Merb plugin.
> So far, it only works with ActiveRecord including fixtures.
> Has any played with it? If so, did you get it to work?
>
> I'm going to be submitting a patch for Controller specs soon. It  
> will be very bare bones, given my current lack of understanding of  
> Merb controller development.
> View and Helper specs will follow.
>
> I saw the question on IRC, but should ROM be folded into Merb  
> itself, or act as a plugin? There are advantages and disadvantages  
> to both.
>
> A pull to integrate classes into Merb is that these classes can be  
> reused by Test::Unit tests and Rspec.
> A pull to keep classes in a plugin is It can change whenever Merb  
> or Rspec changes. Since both Merb and Rspec are rapidly evolving,  
> there may be a need for the plugin for a while.
> Since Test::Unit is fairly static, there may not be a need to make  
> the Test::Unit library a plugin.
>
> One flaw with Rails, that I hope does not get repeated in Merb, is  
> the tight coupling with Test;:Unit (same with tight coupling with  
> Rspec). Of course Rspec did not exist when Rails was first  
> developed, so this should not be much of a problem as long as we  
> are vigilant. :)
>
> Brian
>

Hey Brian-

        I was able to get the user specs running in mrblog trunk. I commited  
a rake task to run them as 'rake specs'.  The presence of a spec  
harness makes the need for proper environments in merb urgent. I will  
hack up environments with different db settings this weekend so it  
will make testing and deving easier.

        I think that we should keep it as a plugin for a little while. I  
don't want to go down the tightly coupled road in merb's testing  
capabilities. I think there are some core helper classes I need to  
write that could go in the framework and be used by test/unit or  
rspec or whatver. Like a helper for making requests thru the  
dispacther and controllers to test output without booting a  
webserver, and some other stuff that will help with testing.

        I'd like to see the test helpers that are merb specific made into  
libraries within merb that you can use from test/unit, test/spec or  
rspec.

        Thanks for getting this started Brian, it's a nice plugin. If you  
have any questions about merb internals please feel free to ask and I  
will help you grok it quickly.

Cheers-
-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- [EMAIL PROTECTED]
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)


_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to