What does Steak add beyond just using Capybara and RSpec in Rails testing?

后端 未结 2 2122
面向向阳花
面向向阳花 2021-01-04 23:15

I\'m trying to understand the need for Steak. I get that its like Cucumber, except that you can use pure ruby instead of mapping your english language specs to ruby like in

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-05 00:07

    Your hunch is possibly correct and Steak further confuses the rSpec testing namespace.

    The 'acceptance' directory, for example, implies you are doing acceptance testing with steak, which is rarely the case and generally the reason you use Steak over cucumber.

    For a clearer definition see: http://en.wikipedia.org/wiki/Acceptance_testing

    Since you are ruling out cucumber and using rSpec, which is typically not known as a DSL that stakeholders / non technical analysts read, a closer fit might be integration testing:

    http://en.wikipedia.org/wiki/Integration_testing

    We are phasing out steak in favor of rSpecs native 'request' and 'feature' specs, which are essentially the same thing out of the box. It might be worth checking those out.

    https://www.relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec https://www.relishapp.com/rspec/rspec-rails/docs/feature-specs/feature-spec

提交回复
热议问题