SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
Rspec 101,[object Object],Jason Noble,[object Object],http://jasonnoble.org,[object Object]
Example Group,[object Object],describe(),[object Object],Defines example group of tests,[object Object],String we pass describes the item we’re testing,[object Object],it(),[object Object],Defines a code example,[object Object],String we pass describes the specific behaviour,[object Object]
describe() Method,[object Object],describe “A User” {…},[object Object],A User,[object Object],describe User {…},[object Object],User,[object Object],describe User, “with no roles assigned” {…},[object Object],User with no roles assigned,[object Object]
Describe blocks can be nested,[object Object]
context() method,[object Object],context() is an alias for describe(),[object Object],Use describe() for things, context() for context,[object Object]
it() method,[object Object],Argument should state what is being tested,[object Object]
Pending tests,[object Object],We can mark tests to be implemented “later”,[object Object]
Pending tests (cont.),[object Object],Each method of marking a test as pending has its usefulness:,[object Object],Add pending examples as you think of stuff to test,[object Object],Disable failing examples without losing track that you need to fix those at some point,[object Object],Wrap failing examples when you want to be notified when changes to the system cause them to pass (bug is fixed, etc),[object Object]
before()/after() method,[object Object],Before/after methods helps you set and/or reset initial state,[object Object],Create a new stack, add one element to it,[object Object],Takes one argument,[object Object],:each,[object Object],Executes this block before each test group executes,[object Object],:all,[object Object],Executes this block once for all tests before the first test is run,[object Object]
before(:each) method,[object Object]
before(:all),[object Object],Method is run once and only once for a group of tests,[object Object],Be careful using this method, usually we want each test to have it’s own environment setup,[object Object],Sharing state between examples can cause unexpected things,[object Object],Good examples:,[object Object],Opening a network connection,[object Object],Pre-seeding caches,[object Object]
after(:each) method,[object Object],Code is ran after each example,[object Object],Rarely necessary because each example runs in its own scope, and consequently the instance variables in that scope are reset,[object Object],Can be useful to reset global state of things after your test completes,[object Object],after(:each) is guaranteed to run after each example, even if failure or errors are raised,[object Object]
after(:each) example,[object Object]
after(:all) method,[object Object],This is even more rare than the after(:each),[object Object],Examples:,[object Object],Close down browsers,[object Object],Close database connections,[object Object],Close sockets,[object Object],Any resource we want to release when we’re done, but not after every individual test,[object Object]
around(:each) method,[object Object],Supports APIs that require a block,[object Object],Very rarely, if ever used,[object Object],I have never used this,[object Object],Put your functionality into before/after blocks if at all possible,[object Object],See http://relishapp.com/rspec/rspec-core/v/2-0/dir/hooks/around-hooks if you’re interested,[object Object]
Helper Methods,[object Object],Defined within an example group,[object Object],Available to all examples in the group,[object Object]
Shared Helper Methods,[object Object],If helper methods need to be used across example groups, put them in one or more modules and include modules in example groups we want to have access,[object Object]
Shared Examples,[object Object],If we expect instances of more than one class to behave in the same way, a shared example group describes the behavior once and includes it in multiple example groups,[object Object]
Shared examples (cont.),[object Object]
RSpec::Expectations,[object Object],One goal of BDD is getting the words right,[object Object],Expectations vs. Assertions,[object Object],We are setting an expectation of what should happen rather than what will happen,[object Object],In fact the word should is part of RSpec,[object Object],result.should equal(5),[object Object],message.should match(/on Sunday/),[object Object]
should, should_not and matchers,[object Object],result.should equal(5),[object Object],If result is equal to 5, it passes,[object Object],result.should_not equal(5),[object Object],If result is anything other than 5, it passes,[object Object],General Pattern:result.should   ________(value),[object Object],_______ is a matcher,[object Object]
RSpec built in Matchers,[object Object],include(item),[object Object],prime_numbers.should_not include(8),[object Object],respond_to(message),[object Object],list.shouldrespond_to(:length),[object Object],raise_error(type),[object Object],lambda { Object.new.explode! }.should raise_error(NameError),[object Object]
4 ways to be equal,[object Object],a == b,[object Object],Value equality (Most common),[object Object],a === b,[object Object],Is Object a the same Object as b,[object Object],a.eql?(b),[object Object],Are a and b values equal and of same type,[object Object],a.equal?(b),[object Object],Is Object a the same Object as b,[object Object],(General Rule: The longer the method name, the more restrictive the matcher is),[object Object]
Do not use != in expectations,[object Object],actual.should != expected,[object Object],action.should_not == expected,[object Object],Causes issues, explained in detail in the RSpec book,[object Object]
Floating Point Calculations,[object Object],“expected 5.25 got 5.251” is frustrating in a failure message,[object Object],RSpec offers a be_close matcher that accepts an expected value and an acceptable delta,[object Object],result.shouldbe_close(5.25, 0.005),[object Object],Will pass as long as result is within .005 of 5.25,[object Object]
Matching Text,[object Object],response.should match(/this expression/),[object Object],Matches if response has text “this expression” somewhere in its contents,[object Object],response.should =~ /this expression/,[object Object],Functionally equivalent to the previous one,[object Object]
Expect{},[object Object],Tests that a block of code causes some effect,[object Object],You can also use .to(1) or .from(0).to(1),[object Object]
Predicate Matchers,[object Object],How do we test array.empty?,[object Object],array.empty?.should == true,[object Object],array.shouldbe_empty,[object Object]
Predicate matchers (cont.),[object Object],RSpec gives you other options,[object Object],be_,[object Object],be_a,[object Object],ted.shouldbe_a_kind_of(Player)  => ted.kind_of?(Player),[object Object],be_an,[object Object],ted.shouldbe_an_instance_of(Player) =>ted.instance_of?(Player),[object Object],RSpec also lets you write your own matchers,[object Object]
Matchers,[object Object],have_ becomes has_,[object Object],request_params.shouldhave_key(:id) =>request_params.has_key?(:id).should == true,[object Object]
specify{},[object Object],Sometimes RSpec can guess your tests,[object Object],it “should have 32 pieces” do	@board.should have(32).piecesend,[object Object],specify { @board.should have(32).pieces },[object Object],This is used rarely (very simple tests),[object Object]
subject {},[object Object],Clean up your tests by specifying a subject,[object Object]
RSpec Mocks,[object Object],Mocks allow you to fake functionality that isn’t being tested.  See the book for more info.,[object Object]
rspec command,[object Object],rspec –help,[object Object],List options available to running RSpec,[object Object],rspec spec/simple_math_spec.rb,[object Object],Run only one spec file,[object Object],rspec spec,[object Object],Run all specs in spec/ directory,[object Object],rspec spec --format documentation,[object Object],Makes RSpec more verbose with test output,[object Object]
rspec commands (cont.),[object Object],rspec spec –color,[object Object],Passing is green, pending is yellow, fail is red,[object Object],Store common options in .rspec file,[object Object],--color,[object Object],--format documentation,[object Object],Options stored in ./.rspec take precedence over ~/.rspec, options declared command line win,[object Object]
Let’s get started,[object Object],mkdir -p calculator/{lib,spec},[object Object],cd calculator,[object Object],mate .,[object Object]
spec/calculator_spec.rb,[object Object],lib/calculator.rb,[object Object]
spec/calculator_spec.rb,[object Object]

Contenu connexe

Tendances

How To Test Everything
How To Test EverythingHow To Test Everything
How To Test Everythingnoelrap
 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSJim Lynch
 
Test-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsTest-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsFITC
 
Describe's Full of It's
Describe's Full of It'sDescribe's Full of It's
Describe's Full of It'sJim Lynch
 
Rspec API Documentation
Rspec API DocumentationRspec API Documentation
Rspec API DocumentationSmartLogic
 
Perl Tidy Perl Critic
Perl Tidy Perl CriticPerl Tidy Perl Critic
Perl Tidy Perl Criticolegmmiller
 
Introduction to Python decorators
Introduction to Python decoratorsIntroduction to Python decorators
Introduction to Python decoratorsrikbyte
 
Test in action week 4
Test in action   week 4Test in action   week 4
Test in action week 4Yi-Huan Chan
 
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...Samyak Bhalerao
 
Test in action – week 1
Test in action – week 1Test in action – week 1
Test in action – week 1Yi-Huan Chan
 
Behaviour-Driven Development
Behaviour-Driven DevelopmentBehaviour-Driven Development
Behaviour-Driven DevelopmentKerry Buckley
 
Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2
Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2
Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2Katy Slemon
 
Effective Java with Groovy - How Language Influences Adoption of Good Practices
Effective Java with Groovy - How Language Influences Adoption of Good PracticesEffective Java with Groovy - How Language Influences Adoption of Good Practices
Effective Java with Groovy - How Language Influences Adoption of Good PracticesNaresha K
 
Unit Testing in SilverStripe
Unit Testing in SilverStripeUnit Testing in SilverStripe
Unit Testing in SilverStripeIngo Schommer
 
Testing Legacy Rails Apps
Testing Legacy Rails AppsTesting Legacy Rails Apps
Testing Legacy Rails AppsRabble .
 

Tendances (20)

How To Test Everything
How To Test EverythingHow To Test Everything
How To Test Everything
 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
 
Test-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsTest-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS Applications
 
Describe's Full of It's
Describe's Full of It'sDescribe's Full of It's
Describe's Full of It's
 
Rspec API Documentation
Rspec API DocumentationRspec API Documentation
Rspec API Documentation
 
Ruby on rails rspec
Ruby on rails rspecRuby on rails rspec
Ruby on rails rspec
 
Test driven development_for_php
Test driven development_for_phpTest driven development_for_php
Test driven development_for_php
 
Perl Tidy Perl Critic
Perl Tidy Perl CriticPerl Tidy Perl Critic
Perl Tidy Perl Critic
 
Introduction to Python decorators
Introduction to Python decoratorsIntroduction to Python decorators
Introduction to Python decorators
 
Test in action week 4
Test in action   week 4Test in action   week 4
Test in action week 4
 
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...
 
TDD, BDD and mocks
TDD, BDD and mocksTDD, BDD and mocks
TDD, BDD and mocks
 
Test in action – week 1
Test in action – week 1Test in action – week 1
Test in action – week 1
 
Behaviour-Driven Development
Behaviour-Driven DevelopmentBehaviour-Driven Development
Behaviour-Driven Development
 
TDD with PhpSpec
TDD with PhpSpecTDD with PhpSpec
TDD with PhpSpec
 
Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2
Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2
Unit Testing in Angular(7/8/9) Using Jasmine and Karma Part-2
 
Effective Java with Groovy - How Language Influences Adoption of Good Practices
Effective Java with Groovy - How Language Influences Adoption of Good PracticesEffective Java with Groovy - How Language Influences Adoption of Good Practices
Effective Java with Groovy - How Language Influences Adoption of Good Practices
 
Unit Testing in SilverStripe
Unit Testing in SilverStripeUnit Testing in SilverStripe
Unit Testing in SilverStripe
 
jasmine
jasminejasmine
jasmine
 
Testing Legacy Rails Apps
Testing Legacy Rails AppsTesting Legacy Rails Apps
Testing Legacy Rails Apps
 

En vedette

Testing with Rspec 3
Testing with Rspec 3Testing with Rspec 3
Testing with Rspec 3David Paluy
 
Monitoring web application behaviour with cucumber-nagios
Monitoring web application behaviour with cucumber-nagiosMonitoring web application behaviour with cucumber-nagios
Monitoring web application behaviour with cucumber-nagiosLindsay Holmwood
 
Automated testing with RSpec
Automated testing with RSpecAutomated testing with RSpec
Automated testing with RSpecNascenia IT
 
Serverspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collideServerspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collidem_richardson
 
Behavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and javaBehavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and javaNaveen Kumar Singh
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberAsheesh Mehdiratta
 
RSpec on Rails Tutorial
RSpec on Rails TutorialRSpec on Rails Tutorial
RSpec on Rails TutorialWen-Tien Chang
 
Introduction to BDD with Cucumber for Java
Introduction to BDD with Cucumber for JavaIntroduction to BDD with Cucumber for Java
Introduction to BDD with Cucumber for JavaSeb Rose
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 

En vedette (12)

Testing with Rspec 3
Testing with Rspec 3Testing with Rspec 3
Testing with Rspec 3
 
MacRuby
MacRubyMacRuby
MacRuby
 
Basic RSpec 2
Basic RSpec 2Basic RSpec 2
Basic RSpec 2
 
Monitoring web application behaviour with cucumber-nagios
Monitoring web application behaviour with cucumber-nagiosMonitoring web application behaviour with cucumber-nagios
Monitoring web application behaviour with cucumber-nagios
 
Automated testing with RSpec
Automated testing with RSpecAutomated testing with RSpec
Automated testing with RSpec
 
Serverspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collideServerspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collide
 
Behavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and javaBehavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and java
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
RSpec on Rails Tutorial
RSpec on Rails TutorialRSpec on Rails Tutorial
RSpec on Rails Tutorial
 
Introduction to BDD with Cucumber for Java
Introduction to BDD with Cucumber for JavaIntroduction to BDD with Cucumber for Java
Introduction to BDD with Cucumber for Java
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
RSpec 2 Best practices
RSpec 2 Best practicesRSpec 2 Best practices
RSpec 2 Best practices
 

Similaire à Rspec 101

Ap Power Point Chpt5
Ap Power Point Chpt5Ap Power Point Chpt5
Ap Power Point Chpt5dplunkett
 
Submission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docx
Submission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docxSubmission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docx
Submission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docxdavid4611
 
1. InheritanceIn object oriented programming, inheritance is the .pdf
1. InheritanceIn object oriented programming, inheritance is the .pdf1. InheritanceIn object oriented programming, inheritance is the .pdf
1. InheritanceIn object oriented programming, inheritance is the .pdfaparnacollection
 
Java interview questions 2
Java interview questions 2Java interview questions 2
Java interview questions 2Sherihan Anver
 
Learning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docx
Learning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docxLearning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docx
Learning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docxjesseniasaddler
 
11 advance inheritance_concepts
11 advance inheritance_concepts11 advance inheritance_concepts
11 advance inheritance_conceptsArriz San Juan
 
The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185Mahmoud Samir Fayed
 
Prototype Utility Methods(1)
Prototype Utility Methods(1)Prototype Utility Methods(1)
Prototype Utility Methods(1)mussawir20
 
Java Unit Test - JUnit
Java Unit Test - JUnitJava Unit Test - JUnit
Java Unit Test - JUnitAktuğ Urun
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0tutorialsruby
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0tutorialsruby
 
OCA Java SE 8 Exam Chapter 4 Methods Encapsulation
OCA Java SE 8 Exam Chapter 4 Methods EncapsulationOCA Java SE 8 Exam Chapter 4 Methods Encapsulation
OCA Java SE 8 Exam Chapter 4 Methods Encapsulationİbrahim Kürce
 
Design Patterns
Design PatternsDesign Patterns
Design Patternsimedo.de
 
Unit/Integration Testing using Spock
Unit/Integration Testing using SpockUnit/Integration Testing using Spock
Unit/Integration Testing using SpockAnuj Aneja
 
Comparable/ Comparator
Comparable/ ComparatorComparable/ Comparator
Comparable/ ComparatorSean McElrath
 
Java history, versions, types of errors and exception, quiz
Java history, versions, types of errors and exception, quiz Java history, versions, types of errors and exception, quiz
Java history, versions, types of errors and exception, quiz SAurabh PRajapati
 

Similaire à Rspec 101 (20)

Ap Power Point Chpt5
Ap Power Point Chpt5Ap Power Point Chpt5
Ap Power Point Chpt5
 
Submission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docx
Submission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docxSubmission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docx
Submission GuidelinesREAD ALL SPECIFICATIONS. You only need to c.docx
 
1. InheritanceIn object oriented programming, inheritance is the .pdf
1. InheritanceIn object oriented programming, inheritance is the .pdf1. InheritanceIn object oriented programming, inheritance is the .pdf
1. InheritanceIn object oriented programming, inheritance is the .pdf
 
Laravel Unit Testing
Laravel Unit TestingLaravel Unit Testing
Laravel Unit Testing
 
Java interview questions 2
Java interview questions 2Java interview questions 2
Java interview questions 2
 
Learning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docx
Learning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docxLearning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docx
Learning ObjectivesAbstract ClassDynamic BindingReinforce Conc.docx
 
11 advance inheritance_concepts
11 advance inheritance_concepts11 advance inheritance_concepts
11 advance inheritance_concepts
 
The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185The Ring programming language version 1.5.4 book - Part 74 of 185
The Ring programming language version 1.5.4 book - Part 74 of 185
 
Java mcq
Java mcqJava mcq
Java mcq
 
Prototype Utility Methods(1)
Prototype Utility Methods(1)Prototype Utility Methods(1)
Prototype Utility Methods(1)
 
Java Unit Test - JUnit
Java Unit Test - JUnitJava Unit Test - JUnit
Java Unit Test - JUnit
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0
 
RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0RubyMiniGuide-v1.0_0
RubyMiniGuide-v1.0_0
 
OCA Java SE 8 Exam Chapter 4 Methods Encapsulation
OCA Java SE 8 Exam Chapter 4 Methods EncapsulationOCA Java SE 8 Exam Chapter 4 Methods Encapsulation
OCA Java SE 8 Exam Chapter 4 Methods Encapsulation
 
Unit testing
Unit testingUnit testing
Unit testing
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Unit/Integration Testing using Spock
Unit/Integration Testing using SpockUnit/Integration Testing using Spock
Unit/Integration Testing using Spock
 
Comparable/ Comparator
Comparable/ ComparatorComparable/ Comparator
Comparable/ Comparator
 
Java history, versions, types of errors and exception, quiz
Java history, versions, types of errors and exception, quiz Java history, versions, types of errors and exception, quiz
Java history, versions, types of errors and exception, quiz
 

Plus de Jason Noble

Intro to TDD and BDD
Intro to TDD and BDDIntro to TDD and BDD
Intro to TDD and BDDJason Noble
 
Davinci git brown_bag
Davinci git brown_bagDavinci git brown_bag
Davinci git brown_bagJason Noble
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaJason Noble
 
Cart creation-101217222728-phpapp01
Cart creation-101217222728-phpapp01Cart creation-101217222728-phpapp01
Cart creation-101217222728-phpapp01Jason Noble
 
Validation unit testing
Validation unit testingValidation unit testing
Validation unit testingJason Noble
 
Creating the application
Creating the applicationCreating the application
Creating the applicationJason Noble
 
Atlanta Pm Git 101
Atlanta Pm Git 101Atlanta Pm Git 101
Atlanta Pm Git 101Jason Noble
 

Plus de Jason Noble (17)

Intro to TDD and BDD
Intro to TDD and BDDIntro to TDD and BDD
Intro to TDD and BDD
 
Davinci git brown_bag
Davinci git brown_bagDavinci git brown_bag
Davinci git brown_bag
 
Dash of ajax
Dash of ajaxDash of ajax
Dash of ajax
 
jQuery Intro
jQuery IntrojQuery Intro
jQuery Intro
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp Atlanta
 
Google apps
Google appsGoogle apps
Google apps
 
Smarter cart
Smarter cartSmarter cart
Smarter cart
 
Cart creation-101217222728-phpapp01
Cart creation-101217222728-phpapp01Cart creation-101217222728-phpapp01
Cart creation-101217222728-phpapp01
 
Catalog display
Catalog displayCatalog display
Catalog display
 
Validation unit testing
Validation unit testingValidation unit testing
Validation unit testing
 
Creating the application
Creating the applicationCreating the application
Creating the application
 
Capistrano
CapistranoCapistrano
Capistrano
 
Atlanta Pm Git 101
Atlanta Pm Git 101Atlanta Pm Git 101
Atlanta Pm Git 101
 
Regex Intro
Regex IntroRegex Intro
Regex Intro
 
Git101
Git101Git101
Git101
 
Git Atlrug
Git AtlrugGit Atlrug
Git Atlrug
 
Git102
Git102Git102
Git102
 

Dernier

Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 

Dernier (20)

Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 

Rspec 101

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.

Notes de l'éditeur

  1. Thebe_XXXX test works only if the item you called should on has a XXXX? method.
  2. If the should method doesn’t have an explicit receiver, it will delegate to the declared subject.Read your tests out loud to make sure they sound right. “Specify the subject should be eligible to vote” vs “it should be eligible to vote”.
  3. should_receive will error if :name is not calledstub will not error if :occupation is not called