• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Behavior Driven Infrastructure 2011-01
 

Behavior Driven Infrastructure 2011-01

on

  • 1,012 views

My presentation to Ruby Users of Minnesota in January of 2011. This is an early version of this talk.

My presentation to Ruby Users of Minnesota in January of 2011. This is an early version of this talk.

Statistics

Views

Total Views
1,012
Views on SlideShare
1,008
Embed Views
4

Actions

Likes
0
Downloads
8
Comments
0

1 Embed 4

https://code.bestbuy.com 4

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Behavior Driven Infrastructure 2011-01 Behavior Driven Infrastructure 2011-01 Presentation Transcript

  • Behavior Driven Infrastructure Jeffrey Hulten Automated Labs, LLC
  • Hearing it here, first!
  • Who Am I?
  • Behavior Driven?
  • BDD
  • Cucumber & rSpec
  • Infrastructure as Code
  • Where are the tests?
  • Behavior Driven Infrastructure
  • What do we need?cucumber => "~> 0.9.2"net-ssh => "~> 2.0.23"webrat => "~> 0.7.1"rspec => "~> 2.0.0"cucumber-nagios => "~> 0.7.6"
  • Learn Gherkin! GIVEN WHEN THEN
  • Given...PrerequisitesNot required in a scenario“Given the user ‘tom’ exists”
  • When...Action to take“When I look at the directory ‘/home/tom’”
  • Then...Results to expect“Then it should be owned by ‘tom’”
  • And...Just like the one above“Then it should be owned by ‘tom’”“And it should be mode 0755”
  • ScenarioGiven the user ‘tom’ existsWhen I look at the directory ‘/home/tom’Then it should be owned by ‘tom’And it should be mode 0755
  • That’s not Ruby!Scenarios are in EnglishStep Definitions are in Ruby
  • Step DefinitionsWhen /^I look at the directory ([^]*)$/ do |arg1| @filename = arg1endThen /^it should be owned by "([^"]*)"$/ do |arg1| ...end
  • Demo
  • Thanks! Jeffrey Hulten jeffh@automatedlabs.com http://automatedlabs.comFeedback @ http://spkr8.com/t/5475