ChefSpec Cheat Sheet. Published on July 28, 2015. When it comes to testing your Chef cookbooks, currently there seem to be two tools that build the standard in the Chef community: ChefSpec and Test Kitchen (with Serverspec, which is the third tool). Briefly look over RSpec’s other matchers, if you haven’t done so already. Briefly look over the RSpec styling and syntax recommended by BetterSpecs and read through the first six guidelines. The RSpec Cheat Sheet should help you avoid Googling every new bit of syntax. The one-page guide to Capybara: usage, examples, links, snippets, and more.
Rspec Cheat Sheet Pdf
Rspeccheatsheet.graffle Author: Carlos Gabaldon Created Date: 0600Z. The one-page guide to Capybara: usage, examples, links, snippets, and more.
- have_no_css has_no_css?'nav li.active', count: 1'section', between: 2..4'.cta-btn', maximum: 2'article > p', mininum: 5'a[href$='cheatrags.com']'
- have_no_xpath has_no_xpath?'//*[contains(., 'Kapow!')]'
- have_no_button has_no_button?'Save'
- have_no_link has_no_link?'Profile', href: ‘/profile’
- have_no_field has_no_field?'Employment', with: 'Liquor Ace''known-as', with: 'Chef''Biography', type: 'textarea''fancy-checkbox', checked: true
- have_no_select has_no_select?'pills', selected: ‘Red’
- have_table has_table?'Analytics'
Rspec Expectations Cheat Sheet
have_no_titlehas_no_title?