Hi all, Does anyone know how to get radrails to use RSpec specs instead of tests? Cheers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Daniel, > Does anyone know how to get radrails to use RSpec specs instead of tests? Give a try to the simply_bdd plugin. http://svn.techno-weenie.net/projects/plugins/simply_bdd/README It makes using RSpec a lot easier: you run rspec code like normal tests (see the example in the README page), and it works fine with autotest. Not shown in the README example is the need to use require ''spec'' to access the should_** magic. Example: file: test/unit/a_user_test.rb require File.dirname(__FILE__) + ''/../test_helper'' require ''spec'' context "A User with no name" do def setup @user = User.new end specify "should be invalid" do # assert !@user.valid? # std way @user.should_not_be_valid # rspec way end end Alain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
ljredpath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-26 10:03 UTC
Re: Radrails and RSpec
"It makes using RSpec a lot easier" Its best not to confuse Rick''s plugin with RSpec - they aren''t the same and whilst simply bdd is neat, it doesn''t give you the full power of RSpec (such as the should_ expectations). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
ljredpath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-26 10:04 UTC
Re: Radrails and RSpec
ljredp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> "It makes using RSpec a lot easier" > > Its best not to confuse Rick''s plugin with RSpec - they aren''t the same > and whilst simply bdd is neat, it doesn''t give you the full power of > RSpec (such as the should_ expectations).Scratch that, didn''t read the above post properly. If you want to use RadRails though, can''t you still just use the console to run your tests? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> Its best not to confuse Rick''s plugin with RSpec - they aren''t the same> and whilst simply bdd is neat, it doesn''t give you the full power of > RSpec (such as the should_ expectations). Read my msg again, and the example I gave: it uses a should_* expectation. Alain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 10/26/06, Alain Ravet <alain.ravet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > Its best not to confuse Rick''s plugin with RSpec - they aren''t the > same > > and whilst simply bdd is neat, it doesn''t give you the full power of > > RSpec (such as the should_ expectations). > > Read my msg again, and the example I gave: it uses a should_* expectation. > > AlainThanx for the insight. I''ve been using simply_bdd for this but didn''t even think to require spec. I''m not sure that I understand exactly what''s happening here though. If I require spec, which context method is being called? simply_bdd or rpsec? Does it make a difference? Luke, I can use consle for testing, but I rather use it in RadRails when I''m developing there. I guess bdd just reasonates with me, and I''d like to use it. It seems that requiring spec in the test files would give me the best of both worlds. I can use the should_** methods and normal assert* methods. Thanx again for the pointers. Cheers Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---