BDD helps us to figure out
1)What to test. - Use cases or User Stories. Test what something does(behavior) rather than what something is (structure)
2)Where to start. - From the outermost layer.
3)What to ignore.- Ignore the stuff in the middle.
-Notes
-Proper acceptance test treat your application as a black box. Which means that they should have no knowledge of your application.
- Capybara is a browser automation library.
- helps you test web applications by stimulating how areal user would interact with your app.
- It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in.
- Rack::Test run requests against your app, then provides the resulting HRML to capybara and rspec examination.
-When testing
Remember order for the db commands:
rake db:reset
rake db:migrate
rake db:test:prepare
rake db:populate
1)What to test. - Use cases or User Stories. Test what something does(behavior) rather than what something is (structure)
2)Where to start. - From the outermost layer.
3)What to ignore.- Ignore the stuff in the middle.
-Notes
-Proper acceptance test treat your application as a black box. Which means that they should have no knowledge of your application.
- Capybara is a browser automation library.
- helps you test web applications by stimulating how areal user would interact with your app.
- It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in.
- Rack::Test run requests against your app, then provides the resulting HRML to capybara and rspec examination.
-When testing
Remember order for the db commands:
rake db:reset
rake db:migrate
rake db:test:prepare
rake db:populate