Is Cucumber just a wrapper around rspec to help organize tests in functions?

I just want to make sure that I understand things.

From what I am compiling so far, Cucumber is just a “wrapper” or a good way to organize your tests by classifying things into functions and steps where the actual unit tests are in the step phase.

This allows you to organize your tests, how everything will work.

Is it correct?

+5
source share
4 answers

Sorting.

, . , , Rails, . , Scenario.

, Cucumber, , () , . , , , , .

, :

Given /I have a user account/ do
  @user = Factory.create(:user)
  # ... more user set up
end

, , - :

Given /I have a user account/ do
  visit new_user_url
  fill_in "user_login", :with => "some name"
  fill_in "user_password", :with => "foo"
  # ... whatever else your sign up page needs
end

, , , .

, , .

  • shoulda, rspec .
  • auth (, ) Rails.
  • auth ( , ) Cucumber.

, , Rails , , ..

+6

Cucumber, , , , . ( / ) . - , .

, Cucumber , RSpec Ruby, ( ) , .

+2
+1

RSpec. RSpec - , ( ), - , .

RSpec , . , .

Cucumber, , , , . , , . Agile , .

Cucumber Features/Scenarios, RSpec. , , .

0
source

All Articles