I want to start diving into BDD. I have never used TDD before and am not sure if I should start by learning RSpec and then jump to Cucumber or just go straight to using Cucumber. I have been reading on the internet about both and it seems to me that Cucumber could be a ''replacement'' for RSpec. Am I right or should be one used for certain things and the other one for others? Thanks in advance. Pepe -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes, cucumber and rspec are both used for BDD. I personally prefer Cucumber, but some people find it offputting, and prefer their tests to be less english, more code. Both are great tools, though. On Mon, Feb 1, 2010 at 1:04 AM, pepe <Pepe-gUAqH5+0sKL6V6G2DxALlg@public.gmane.org> wrote:> I want to start diving into BDD. I have never used TDD before and am > not sure if I should start by learning RSpec and then jump to Cucumber > or just go straight to using Cucumber. > > I have been reading on the internet about both and it seems to me that > Cucumber could be a ''replacement'' for RSpec. Am I right or should be > one used for certain things and the other one for others? > > Thanks in advance. > > Pepe > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pepe wrote:> I want to start diving into BDD. I have never used TDD before and am > not sure if I should start by learning RSpec and then jump to Cucumber > or just go straight to using Cucumber.Use both. RSpec is for unit tests, while Cucumber tests user-facing features (and can use steps written in RSpec). Learn RSpec first, but after getting the basics, learn Cucumber alongside it.> > I have been reading on the internet about both and it seems to me that > Cucumber could be a ''replacement'' for RSpec. Am I right or should be > one used for certain things and the other one for others?Cucumber is absolutely not a replacement for RSpec. The two are complementary. Cucumber is a replacement for integration tests.> > Thanks in advance. > > PepeBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks for the answers. How long do you think it could take for a non initiated person like myself to get used to using BDD and learning RSpec and cucumber? Thanks again. On Jan 31, 6:27 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> pepe wrote: > > I want to start diving into BDD. I have never used TDD before and am > > not sure if I should start by learning RSpec and then jump to Cucumber > > or just go straight to using Cucumber. > > Use both. RSpec is for unit tests, while Cucumber tests user-facing > features (and can use steps written in RSpec). Learn RSpec first, but > after getting the basics, learn Cucumber alongside it. > > > > > I have been reading on the internet about both and it seems to me that > > Cucumber could be a ''replacement'' for RSpec. Am I right or should be > > one used for certain things and the other one for others? > > Cucumber is absolutely not a replacement for RSpec. The two are > complementary. Cucumber is a replacement for integration tests. > > > > > Thanks in advance. > > > Pepe > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry, one more thing. What could be the best sources of information to learn how to use both tools? I learn much better with examples. I have searched for the RSpec book, which for what I''ve read has both subjects in it, but it seems it''s not yet available. Thank you. On Jan 31, 10:00 pm, pepe <P...-1PhG29ZdMB/g+20BJ0uB2w@public.gmane.org> wrote:> Thanks for the answers. > > How long do you think it could take for a non initiated person like > myself to get used to using BDD and learning RSpec and cucumber? > > Thanks again. > > On Jan 31, 6:27 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > pepe wrote: > > > I want to start diving into BDD. I have never used TDD before and am > > > not sure if I should start by learning RSpec and then jump to Cucumber > > > or just go straight to using Cucumber. > > > Use both. RSpec is for unit tests, while Cucumber tests user-facing > > features (and can use steps written in RSpec). Learn RSpec first, but > > after getting the basics, learn Cucumber alongside it. > > > > I have been reading on the internet about both and it seems to me that > > > Cucumber could be a ''replacement'' for RSpec. Am I right or should be > > > one used for certain things and the other one for others? > > > Cucumber is absolutely not a replacement for RSpec. The two are > > complementary. Cucumber is a replacement for integration tests. > > > > Thanks in advance. > > > > Pepe > > > Best, > > -- > > Marnen Laibow-Koserhttp://www.marnen.org > > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Jan 31, 2010 at 10:05 PM, pepe <Pepe-gUAqH5+0sKL6V6G2DxALlg@public.gmane.org> wrote:> Sorry, one more thing. What could be the best sources of information > to learn how to use both tools? I learn much better with examples. > > I have searched for the RSpec book, which for what I''ve read has both > subjects in it, but it seems it''s not yet available. > > Thank you. > >Pepe, I would recommend getting the PDF now because this book is due to release in February. Other than that, you might want to try the following web sites: http://rspec.info/ http://cukes.info/ Lastly, there are many screencasts on the subject which can be easily found using Google. Good luck, -Conrad On Jan 31, 10:00 pm, pepe <P...-1PhG29ZdMB/g+20BJ0uB2w@public.gmane.org> wrote:> > Thanks for the answers. > > > > How long do you think it could take for a non initiated person like > > myself to get used to using BDD and learning RSpec and cucumber? > > > > Thanks again. > > > > On Jan 31, 6:27 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > > > pepe wrote: > > > > I want to start diving into BDD. I have never used TDD before and am > > > > not sure if I should start by learning RSpec and then jump to > Cucumber > > > > or just go straight to using Cucumber. > > > > > Use both. RSpec is for unit tests, while Cucumber tests user-facing > > > features (and can use steps written in RSpec). Learn RSpec first, but > > > after getting the basics, learn Cucumber alongside it. > > > > > > I have been reading on the internet about both and it seems to me > that > > > > Cucumber could be a ''replacement'' for RSpec. Am I right or should be > > > > one used for certain things and the other one for others? > > > > > Cucumber is absolutely not a replacement for RSpec. The two are > > > complementary. Cucumber is a replacement for integration tests. > > > > > > Thanks in advance. > > > > > > Pepe > > > > > Best, > > > -- > > > Marnen Laibow-Koserhttp://www.marnen.org > > > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > > -- > > > Posted viahttp://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
There are the bddcasts: www.bddcasts.com They do cost money, but they''re worth it, so is the rspec book. A word of advice: Learning RoR at the same time with Cucumber and RSpec will require you to fight a very steep learning curve. Very often you will neither know how to test something nor how to implement it. You do get a lot of insight into Rails and you''ll learn what every LOC does. But it''s also over with easy copy&pasting code, taking chunks from tutorials and all that. This requires for you to really know what you''re doing or if you don''t - you will have to learn. The quick and dirty solution with BDD doesn''t exist. It can be worth it, but it takes long. I would suggest to get your Rails knowledge on a solid foundation first. "Solid" means stuff you really know and can do - not a collage of railscasts. After that BDD won''t be that hard. Hope that helps Ray -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ray K. wrote:> There are the bddcasts: www.bddcasts.com > They do cost money, but they''re worth it, so is the rspec book. > > A word of advice: > Learning RoR at the same time with Cucumber and RSpec will require you > to fight a very steep learning curve. > Very often you will neither know how to test something nor how to > implement it. You do get a lot of insight into Rails and you''ll learn > what every LOC does. But it''s also over with easy copy&pasting code, > taking chunks from tutorials and all that. This requires for you to > really know what you''re doing or if you don''t - you will have to learn. > > The quick and dirty solution with BDD doesn''t exist. It can be worth it, > but it takes long. > > I would suggest to get your Rails knowledge on a solid foundation first. > "Solid" means stuff you really know and can do - not a collage of > railscasts. > After that BDD won''t be that hard. > > Hope that helps > RayMy approach has been: - use the Agile web development with Rails book to get my ''rails beginner badge'' - used forums such as these and the excellent stuff over on railscasts.com to help bed the knowledge in a bit - Developed my first basic app and deployed it on Heroku With the basics in place I''ve now picked up the RSpec book and it seems to be at the right time. I have a couple of rails apps in the pipeline and would like to approach them using BDD and with the bsic rails knowledge i have the book is making sense. It helps that I have alot of experience in software testing and i can comfortably see where the boundary between rspec and cucumber exists (and also where other tools such as selenium and webrat pick up as well). Just to echo the previous poster though - i''d recommend getting the rails basics down first and perhaps develop a small application of your own as well. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pepe wrote:> Sorry, one more thing. What could be the best sources of information > to learn how to use both tools? I learn much better with examples. > > I have searched for the RSpec book, which for what I''ve read has both > subjects in it, but it seems it''s not yet available.I learned both Cucumber and RSpec from the official websites.> > Thank you.Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ray K. wrote:> There are the bddcasts: www.bddcasts.com > They do cost money, but they''re worth it, so is the rspec book. > > A word of advice: > Learning RoR at the same time with Cucumber and RSpec will require you > to fight a very steep learning curve. > Very often you will neither know how to test something nor how to > implement it. You do get a lot of insight into Rails and you''ll learn > what every LOC does. But it''s also over with easy copy&pasting code, > taking chunks from tutorials and all that. This requires for you to > really know what you''re doing or if you don''t - you will have to learn. > > The quick and dirty solution with BDD doesn''t exist. It can be worth it, > but it takes long.That''s absolutely false. I learned Rails and RSpec at the same time (Cucumber didn''t exist yet). It was no problem.> > I would suggest to get your Rails knowledge on a solid foundation first. > "Solid" means stuff you really know and can do - not a collage of > railscasts. > After that BDD won''t be that hard.No, no, no! Then you''ll be writing untested code, which is worse. Definitely don''t go for the collage of Railscasts, but don''t hold off on learning proper testing either. It''s an essential part of programming in the 21st century.> > Hope that helps > RayBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Learn it in parallel. Any resource will work just fine, you will learn the basics easily. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Well, unfortunately untested code is part of reality. Although I have tried to be good and test all I could I have not followed a methodology or tool to get things done right the first time and be more efficient at it and I am sure there are parts of my code that I missed, reason why I am so interested in BDD. Ruby and Rails should not be a major problem. Although I am no expert I can push my way through getting scratched by thorns and everything else in the process. ;) Although at times painful, I have learned a lot so far. Thank you all very much for your ideas and the will to share your knowledge. Pepe On Feb 1, 8:04 am, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Ray K. wrote: > > There are the bddcasts:www.bddcasts.com > > They do cost money, but they''re worth it, so is the rspec book. > > > A word of advice: > > Learning RoR at the same time with Cucumber and RSpec will require you > > to fight a very steep learning curve. > > Very often you will neither know how to test something nor how to > > implement it. You do get a lot of insight into Rails and you''ll learn > > what every LOC does. But it''s also over with easy copy&pasting code, > > taking chunks from tutorials and all that. This requires for you to > > really know what you''re doing or if you don''t - you will have to learn. > > > The quick and dirty solution with BDD doesn''t exist. It can be worth it, > > but it takes long. > > That''s absolutely false. I learned Rails and RSpec at the same time > (Cucumber didn''t exist yet). > It was no problem. > > > > > I would suggest to get your Rails knowledge on a solid foundation first. > > "Solid" means stuff you really know and can do - not a collage of > > railscasts. > > After that BDD won''t be that hard. > > No, no, no! Then you''ll be writing untested code, which is worse. > Definitely don''t go for the collage of Railscasts, but don''t hold off on > learning proper testing either. It''s an essential part of programming > in the 21st century. > > > > > Hope that helps > > Ray > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Quoting pepe <Pepe-1PhG29ZdMB/g+20BJ0uB2w@public.gmane.org>: [snip]> Ruby and Rails should not be a major problem. Although I am no expert > I can push my way through getting scratched by thorns and everything > else in the process. ;) Although at times painful, I have learned a > lot so far. >Nice metaphor. I empathize and sympathize. Jeffrey -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks Jeffrey. :) On Feb 1, 6:21 pm, "Jeffrey L. Taylor" <r...-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org> wrote:> Quoting pepe <P...-1PhG29ZdMB/g+20BJ0uB2w@public.gmane.org>: > [snip]> Ruby and Rails should not be a major problem. Although I am no expert > > I can push my way through getting scratched by thorns and everything > > else in the process. ;) Although at times painful, I have learned a > > lot so far. > > Nice metaphor. I empathize and sympathize. > > Jeffrey-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.