0

For example : consider the log in function .It is requried for all the test cases .I want to call the log in test script from my another test scriptooking say making a b ?Iam using capybara and rspec for automation .

user2391218
  • 412
  • 6
  • 17

1 Answers1

0

One possibility would be to write a helper method in login_helper for example, and then call the method from the tests.

Another possibility would be to create a parent class for the test classes that need the log in function and then put it in the before(:each) hook.

Kristiina
  • 523
  • 2
  • 10