SlideShare a Scribd company logo
Minitest
Raphael Monteiro
Bankfacil
18/02/2015
Summary
● What is Minitest?
● Minitest vs Rspec
● Main assertions (syntax)
● Reasons to use Minitest
● Minitest into Rails
● Minitest into Bankfacil
● Further...
What is Minitest?
Minitest provides a complete suite of testing
facilities.
● minitest/unit
● minitest/spec
● minitest/benchmark
● minitest/mock
● minitest/pride
Minitest vs Rspec
● "rspec is a testing DSL. minitest is ruby." - Adam
Hawkins, "Bow Before Minitest"
● "Rspec is not about testing - it's about
documentation. That's why I prefer it" - Rahoul
Baruah
Main assertions (syntax)
● stub e mock
test 'execute' do
mock = Minitest::Mock.new
LeadToBkfApplicationCreator.stub(:new, mock,
lead_icarros) do
mock.expect(:create, true)
@ruler.execute(lead_icarros)
end
assert mock.verify
end
● more ex:
Reasons to use minitest
● Faster and lighter than Rspec
● It is Ruby, no magic
● Random & parallel tests
● It is part of Ruby and Rails
Minitest into Rails
● Since version 1.9, Ruby provides Minitest
● test folder
● setup and teardown methods
● fixtures
# lo & behold! I am a YAML comment!
david:
name: David Heinemeier Hansson
birthday: 1979-10-15
profession: Systems development
● rake test
Minitest into Bankfacil
● auto_financing project
● assertions not spec
● minitest-focus
● minitest-reporters
class MyTest < MiniTest::Unit::TestCase
def test_unrelated; ...; end
focus
def test_method; ...; end # only
this one will run
def test_method_edgecase; ...; end
end
Further...
● Official website: https://github.com/seattlerb/minitest
● Ruby on Rails guides: http://guides.rubyonrails.org/v3.2.13/testing.html
● Bow Before Minitest by Adam Hawkins: https://speakerdeck.
com/ahawkins/bow-before-minitest
● RubyInside: http://www.rubyinside.com/dhh-offended-by-rspec-debate-4610.
html
● Minitest Quick Reference: http://www.mattsears.
com/articles/2011/12/10/minitest-quick-reference
● 7 Reasons I’m sticking with minitest: http://brandonhilkert.com/blog/7-reasons-
why-im-sticking-with-minitest-and-fixtures-in-rails/
● 7 Reasons I love minitest: https://blog.engineyard.com/2014/seven-reasons-i-
love-minitest

More Related Content

What's hot

A small post about the Casablanca project
A small post about the Casablanca projectA small post about the Casablanca project
A small post about the Casablanca project
PVS-Studio
 
PuppetConf 2015 - Testing - Richard Pijnenburg
PuppetConf 2015 - Testing - Richard PijnenburgPuppetConf 2015 - Testing - Richard Pijnenburg
PuppetConf 2015 - Testing - Richard Pijnenburg
Richard Pijnenburg
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
Gergely Németh
 
PHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with WebgrindPHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with Webgrind
Andy_Gaskell
 
Introduction to react native @ TIC NUST
Introduction to react native @ TIC NUSTIntroduction to react native @ TIC NUST
Introduction to react native @ TIC NUST
Waqqas Jabbar
 
Upgrading to rails3
Upgrading to rails3Upgrading to rails3
Upgrading to rails3
Yi-Ting Cheng
 
Ruby on rails rspec
Ruby on rails rspecRuby on rails rspec
Ruby on rails rspec
Bindesh Vijayan
 

What's hot (7)

A small post about the Casablanca project
A small post about the Casablanca projectA small post about the Casablanca project
A small post about the Casablanca project
 
PuppetConf 2015 - Testing - Richard Pijnenburg
PuppetConf 2015 - Testing - Richard PijnenburgPuppetConf 2015 - Testing - Richard Pijnenburg
PuppetConf 2015 - Testing - Richard Pijnenburg
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
PHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with WebgrindPHP Aberdeen Quick optimisation of PHP with Webgrind
PHP Aberdeen Quick optimisation of PHP with Webgrind
 
Introduction to react native @ TIC NUST
Introduction to react native @ TIC NUSTIntroduction to react native @ TIC NUST
Introduction to react native @ TIC NUST
 
Upgrading to rails3
Upgrading to rails3Upgrading to rails3
Upgrading to rails3
 
Ruby on rails rspec
Ruby on rails rspecRuby on rails rspec
Ruby on rails rspec
 

Similar to Minitest

Unit testing Ch. 13 of Programming Ruby
Unit testing Ch. 13 of Programming RubyUnit testing Ch. 13 of Programming Ruby
Unit testing Ch. 13 of Programming Ruby
lvrubygroup
 
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
apidays
 
Presentacion minitest
Presentacion minitestPresentacion minitest
Presentacion minitest
Ismael G Marín C
 
Of Microservices and Microservices - Robert Munteanu
Of Microservices and Microservices -  Robert MunteanuOf Microservices and Microservices -  Robert Munteanu
Of Microservices and Microservices - Robert Munteanu
mfrancis
 
Of microservices and microservices
Of microservices and microservicesOf microservices and microservices
Of microservices and microservices
Robert Munteanu
 
Apache Sling as a Microservices Gateway
Apache Sling as a Microservices GatewayApache Sling as a Microservices Gateway
Apache Sling as a Microservices Gateway
Robert Munteanu
 
Benchmarks, performance, scalability, and capacity what s behind the numbers...
Benchmarks, performance, scalability, and capacity  what s behind the numbers...Benchmarks, performance, scalability, and capacity  what s behind the numbers...
Benchmarks, performance, scalability, and capacity what s behind the numbers...
james tong
 
Benchmarks, performance, scalability, and capacity what's behind the numbers
Benchmarks, performance, scalability, and capacity what's behind the numbersBenchmarks, performance, scalability, and capacity what's behind the numbers
Benchmarks, performance, scalability, and capacity what's behind the numbers
Justin Dorfman
 
Rails Performance
Rails PerformanceRails Performance
Rails Performance
Wen-Tien Chang
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
Puppet
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
rkhatibi
 
Testing and Software Writer a year later
Testing and Software Writer a year laterTesting and Software Writer a year later
Testing and Software Writer a year later
Simon Bagreev
 
Whoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustWhoops! I Rewrote It in Rust
Whoops! I Rewrote It in Rust
ScyllaDB
 
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
Linaro
 
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)
Linaro
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration Story
Anton Serdyuk
 
SELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the StorySELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the Story
Nathanial McConnell
 
Ruby/rails performance and profiling
Ruby/rails performance and profilingRuby/rails performance and profiling
Ruby/rails performance and profiling
Danny Guinther
 
Feature toggling
Feature togglingFeature toggling
Feature toggling
T. Alexander Lystad
 
Tdd Primer
Tdd PrimerTdd Primer
Tdd Primer
Robert Munteanu
 

Similar to Minitest (20)

Unit testing Ch. 13 of Programming Ruby
Unit testing Ch. 13 of Programming RubyUnit testing Ch. 13 of Programming Ruby
Unit testing Ch. 13 of Programming Ruby
 
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
 
Presentacion minitest
Presentacion minitestPresentacion minitest
Presentacion minitest
 
Of Microservices and Microservices - Robert Munteanu
Of Microservices and Microservices -  Robert MunteanuOf Microservices and Microservices -  Robert Munteanu
Of Microservices and Microservices - Robert Munteanu
 
Of microservices and microservices
Of microservices and microservicesOf microservices and microservices
Of microservices and microservices
 
Apache Sling as a Microservices Gateway
Apache Sling as a Microservices GatewayApache Sling as a Microservices Gateway
Apache Sling as a Microservices Gateway
 
Benchmarks, performance, scalability, and capacity what s behind the numbers...
Benchmarks, performance, scalability, and capacity  what s behind the numbers...Benchmarks, performance, scalability, and capacity  what s behind the numbers...
Benchmarks, performance, scalability, and capacity what s behind the numbers...
 
Benchmarks, performance, scalability, and capacity what's behind the numbers
Benchmarks, performance, scalability, and capacity what's behind the numbersBenchmarks, performance, scalability, and capacity what's behind the numbers
Benchmarks, performance, scalability, and capacity what's behind the numbers
 
Rails Performance
Rails PerformanceRails Performance
Rails Performance
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Testing and Software Writer a year later
Testing and Software Writer a year laterTesting and Software Writer a year later
Testing and Software Writer a year later
 
Whoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustWhoops! I Rewrote It in Rust
Whoops! I Rewrote It in Rust
 
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (I)
 
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)
LCE13: Test and Validation Summit: Evolution of Testing in Linaro (II)
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration Story
 
SELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the StorySELF - Becoming a Rails Developer - The Rest of the Story
SELF - Becoming a Rails Developer - The Rest of the Story
 
Ruby/rails performance and profiling
Ruby/rails performance and profilingRuby/rails performance and profiling
Ruby/rails performance and profiling
 
Feature toggling
Feature togglingFeature toggling
Feature toggling
 
Tdd Primer
Tdd PrimerTdd Primer
Tdd Primer
 

More from Creditas

Hanami & Domain-Driven Design
Hanami & Domain-Driven DesignHanami & Domain-Driven Design
Hanami & Domain-Driven Design
Creditas
 
Application layer
Application layerApplication layer
Application layer
Creditas
 
Hanami with a modern touch
Hanami with a modern touchHanami with a modern touch
Hanami with a modern touch
Creditas
 
Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!
Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!
Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!
Creditas
 
How To Get Organized
How To Get OrganizedHow To Get Organized
How To Get Organized
Creditas
 
O que o seu texto diz sobre você
O que o seu texto diz sobre vocêO que o seu texto diz sobre você
O que o seu texto diz sobre você
Creditas
 
Modern sql
Modern sqlModern sql
Modern sql
Creditas
 
Positive reinforcement and statistics
Positive reinforcement and statisticsPositive reinforcement and statistics
Positive reinforcement and statistics
Creditas
 
Text mining Pre-processing
Text mining Pre-processingText mining Pre-processing
Text mining Pre-processing
Creditas
 
Melanoma: how to detect skin cancer
Melanoma: how to detect skin cancerMelanoma: how to detect skin cancer
Melanoma: how to detect skin cancer
Creditas
 
Rails Girls - RubyConfBR 2015
Rails Girls - RubyConfBR 2015Rails Girls - RubyConfBR 2015
Rails Girls - RubyConfBR 2015
Creditas
 
Como melhorar sua comunicação com sua equipe, sua mãe e seu chefe
Como melhorar sua comunicação com sua equipe, sua mãe e seu chefeComo melhorar sua comunicação com sua equipe, sua mãe e seu chefe
Como melhorar sua comunicação com sua equipe, sua mãe e seu chefe
Creditas
 
O paradoxo da escolha
O paradoxo da escolhaO paradoxo da escolha
O paradoxo da escolha
Creditas
 
A arte de ser Mensch
A arte de ser MenschA arte de ser Mensch
A arte de ser Mensch
Creditas
 
An introduction to MySQL
An introduction to MySQLAn introduction to MySQL
An introduction to MySQL
Creditas
 
GTD - Getting Things Done
GTD - Getting Things DoneGTD - Getting Things Done
GTD - Getting Things Done
Creditas
 
Pig - Analyzing data sets
Pig - Analyzing data setsPig - Analyzing data sets
Pig - Analyzing data sets
Creditas
 
Neo4 j
Neo4 jNeo4 j
Neo4 j
Creditas
 
Learning how to learn
Learning how to learnLearning how to learn
Learning how to learn
Creditas
 
OOCSS and SMACSS
OOCSS and SMACSSOOCSS and SMACSS
OOCSS and SMACSS
Creditas
 

More from Creditas (20)

Hanami & Domain-Driven Design
Hanami & Domain-Driven DesignHanami & Domain-Driven Design
Hanami & Domain-Driven Design
 
Application layer
Application layerApplication layer
Application layer
 
Hanami with a modern touch
Hanami with a modern touchHanami with a modern touch
Hanami with a modern touch
 
Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!
Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!
Jurassic JavaScript Park - Rodando Offline até na ilha Nublar!
 
How To Get Organized
How To Get OrganizedHow To Get Organized
How To Get Organized
 
O que o seu texto diz sobre você
O que o seu texto diz sobre vocêO que o seu texto diz sobre você
O que o seu texto diz sobre você
 
Modern sql
Modern sqlModern sql
Modern sql
 
Positive reinforcement and statistics
Positive reinforcement and statisticsPositive reinforcement and statistics
Positive reinforcement and statistics
 
Text mining Pre-processing
Text mining Pre-processingText mining Pre-processing
Text mining Pre-processing
 
Melanoma: how to detect skin cancer
Melanoma: how to detect skin cancerMelanoma: how to detect skin cancer
Melanoma: how to detect skin cancer
 
Rails Girls - RubyConfBR 2015
Rails Girls - RubyConfBR 2015Rails Girls - RubyConfBR 2015
Rails Girls - RubyConfBR 2015
 
Como melhorar sua comunicação com sua equipe, sua mãe e seu chefe
Como melhorar sua comunicação com sua equipe, sua mãe e seu chefeComo melhorar sua comunicação com sua equipe, sua mãe e seu chefe
Como melhorar sua comunicação com sua equipe, sua mãe e seu chefe
 
O paradoxo da escolha
O paradoxo da escolhaO paradoxo da escolha
O paradoxo da escolha
 
A arte de ser Mensch
A arte de ser MenschA arte de ser Mensch
A arte de ser Mensch
 
An introduction to MySQL
An introduction to MySQLAn introduction to MySQL
An introduction to MySQL
 
GTD - Getting Things Done
GTD - Getting Things DoneGTD - Getting Things Done
GTD - Getting Things Done
 
Pig - Analyzing data sets
Pig - Analyzing data setsPig - Analyzing data sets
Pig - Analyzing data sets
 
Neo4 j
Neo4 jNeo4 j
Neo4 j
 
Learning how to learn
Learning how to learnLearning how to learn
Learning how to learn
 
OOCSS and SMACSS
OOCSS and SMACSSOOCSS and SMACSS
OOCSS and SMACSS
 

Recently uploaded

Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 

Recently uploaded (20)

Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 

Minitest

  • 2. Summary ● What is Minitest? ● Minitest vs Rspec ● Main assertions (syntax) ● Reasons to use Minitest ● Minitest into Rails ● Minitest into Bankfacil ● Further...
  • 3. What is Minitest? Minitest provides a complete suite of testing facilities. ● minitest/unit ● minitest/spec ● minitest/benchmark ● minitest/mock ● minitest/pride
  • 4. Minitest vs Rspec ● "rspec is a testing DSL. minitest is ruby." - Adam Hawkins, "Bow Before Minitest" ● "Rspec is not about testing - it's about documentation. That's why I prefer it" - Rahoul Baruah
  • 5. Main assertions (syntax) ● stub e mock test 'execute' do mock = Minitest::Mock.new LeadToBkfApplicationCreator.stub(:new, mock, lead_icarros) do mock.expect(:create, true) @ruler.execute(lead_icarros) end assert mock.verify end ● more ex:
  • 6. Reasons to use minitest ● Faster and lighter than Rspec ● It is Ruby, no magic ● Random & parallel tests ● It is part of Ruby and Rails
  • 7. Minitest into Rails ● Since version 1.9, Ruby provides Minitest ● test folder ● setup and teardown methods ● fixtures # lo & behold! I am a YAML comment! david: name: David Heinemeier Hansson birthday: 1979-10-15 profession: Systems development ● rake test
  • 8. Minitest into Bankfacil ● auto_financing project ● assertions not spec ● minitest-focus ● minitest-reporters class MyTest < MiniTest::Unit::TestCase def test_unrelated; ...; end focus def test_method; ...; end # only this one will run def test_method_edgecase; ...; end end
  • 9. Further... ● Official website: https://github.com/seattlerb/minitest ● Ruby on Rails guides: http://guides.rubyonrails.org/v3.2.13/testing.html ● Bow Before Minitest by Adam Hawkins: https://speakerdeck. com/ahawkins/bow-before-minitest ● RubyInside: http://www.rubyinside.com/dhh-offended-by-rspec-debate-4610. html ● Minitest Quick Reference: http://www.mattsears. com/articles/2011/12/10/minitest-quick-reference ● 7 Reasons I’m sticking with minitest: http://brandonhilkert.com/blog/7-reasons- why-im-sticking-with-minitest-and-fixtures-in-rails/ ● 7 Reasons I love minitest: https://blog.engineyard.com/2014/seven-reasons-i- love-minitest