Rspec?

Has anyone here tried modifying the behavior_helper to work with rspec
rather than Test::Unit? I looove me some rspec.

Jay L.

Jay L. wrote:

Has anyone here tried modifying the behavior_helper to work with rspec
rather than Test::Unit? I looove me some rspec.

I’m not quite sure what you mean. I’m familiar with rspec, but I’m not
familiar with the behavior_helper.


John L.
http://wiseheartdesign.com

John W. Long wrote:

Jay L. wrote:

Has anyone here tried modifying the behavior_helper to work with rspec
rather than Test::Unit? I looove me some rspec.

I’m not quite sure what you mean. I’m familiar with rspec, but I’m not
familiar with the behavior_helper.

Ermm… sorry, I meant the behavior_render_test_helper. Which, looking
closer, isn’t actually coupled to Test::Unit, so maybe it’ll Just Work
with rspec. Guess I’ll go play with it.

Jay

John W. Long wrote:

There’s a nice class method in test_helper.rb which makes it easy to
throw a bunch of methods in a module and include them with the syntax:

test_helper :module_name

I was just playing with that! Haven’t brought rspec into the picture,
but meanwhile I’ve got hpricot working to test my behavior output:

http://www.jay.fm/blog/testing-your-radiant-behaviors-with-hpricot.html

Jay

Jay L. wrote:

Ermm… sorry, I meant the behavior_render_test_helper. Which, looking
closer, isn’t actually coupled to Test::Unit, so maybe it’ll Just Work
with rspec. Guess I’ll go play with it.

There’s a nice class method in test_helper.rb which makes it easy to
throw a bunch of methods in a module and include them with the syntax:

test_helper :module_name

It handles requiring the appropriate module, etc… All you have to do
is put your module in the test/helpers directory and make it end with
“TestHelper”. See:

http://dev.radiantcms.org/radiant/browser/trunk/radiant/test/test_helper.rb


John L.
http://wiseheartdesign.com

Jay L. wrote:

Haven’t brought rspec into the picture, but meanwhile I’ve got hpricot
working to test my behavior output:

http://www.jay.fm/blog/testing-your-radiant-behaviors-with-hpricot.html

Nice! Keep us posted.


John L.
http://wiseheartdesign.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs