Rspec integration tests without cucumber?

后端 未结 3 1650
慢半拍i
慢半拍i 2021-02-07 21:00

Is there a way to do integration tests with Rspec without using Cucumber? I prefer using just plain old Webrat. Thanks.

相关标签:
3条回答
  • 2021-02-07 21:15

    We've recently started using RSpec with Capybara over Cucumber. Here is a "beginners" blog post I recently wrote on using RSpec integration tests without cucumber.

    End-to-end testing with RSpec integration tests and Capybara

    Let me know if you have any questions on getting your system set up.

    0 讨论(0)
  • 2021-02-07 21:16

    The latest version of RSpec-Rails (1.2.7) now has integration support. Upgrade then start adding specs to spec/integration or use the 'integration_spec' generator. Configure Webrat in spec/spec_helper.rb and you're set!

    0 讨论(0)
  • 2021-02-07 21:30

    As far as I know Rspec is perfectly capable of testing views and controllers as part of integration tests. A quick look around the internet shows this article at Robby on Rails on view testing and some of the Rdocs within RSpec might help.

    Hope this points you in the right direction - I'm afraid I use cucumber myself.

    0 讨论(0)
提交回复
热议问题