Phoenix Rising
2011-Apr-30 13:35 UTC
[rspec-rails] Is it bad form to use spec/requests/*_spec.rb for integration tests?
So I wanted to cook up a quick integration test for something, and I''m using rspec. I personally just don''t like Cucumber - just a personal preference, not a slam to the test framework at all - and wanted to stick to just pure rspec. So I dumped a quick spec file in spec/ reqests and ran it, and of course everything works. But is this considered bad form, or a less-than-good practice? I''ve never written a "request spec" before, so I''m probably mis-using it, but I''d sure like to hear of better ways to do an integration test under rspec where I can just run something like ''rake spec:integration'' (which doesn''t exist by default). This was the best I could do in a pinch, but wouldn''t mind hearing some feedback on a better way to do it in the future - WITHOUT cucumber, selenium, webrat, capbybara, etc. etc. ;-) -- 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.
Alex Katebi
2011-Apr-30 18:22 UTC
Re: [rspec-rails] Is it bad form to use spec/requests/*_spec.rb for integration tests?
http://jeffkreeftmeijer.com/2011/acceptance-testing-using-capybaras-new-rspec-dsl/ <http://jeffkreeftmeijer.com/2011/acceptance-testing-using-capybaras-new-rspec-dsl/>A lot of people prefer RSpec for integration testing too. You only have to deal one test framework RSpec for all your testing. On Sat, Apr 30, 2011 at 9:35 AM, Phoenix Rising <polarisrising-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> So I wanted to cook up a quick integration test for something, and I''m > using rspec. I personally just don''t like Cucumber - just a personal > preference, not a slam to the test framework at all - and wanted to > stick to just pure rspec. So I dumped a quick spec file in spec/ > reqests and ran it, and of course everything works. > > But is this considered bad form, or a less-than-good practice? I''ve > never written a "request spec" before, so I''m probably mis-using it, > but I''d sure like to hear of better ways to do an integration test > under rspec where I can just run something like ''rake > spec:integration'' (which doesn''t exist by default). This was the best > I could do in a pinch, but wouldn''t mind hearing some feedback on a > better way to do it in the future - WITHOUT cucumber, selenium, > webrat, capbybara, etc. etc. ;-) > > -- > 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. > >-- 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.