ESpec |> Elixir BDD
Anton Mishchuk
#pivorak 10
March 25, 2016
About me
- Ruby Developer at Matic Insurance Services Inc
- Big fan of Elixir programming language since 2014
- ESpec package creator & maintainer
- GitHub: antonmi
- Email: anton.mishchuk@gmail.com
How the idea was born
- We are from Ruby world
- We like BDD
- We like RSpec
- It would be perfect to have RSpec like BDD testing framework in Elixir!
Is it possible to implement RSpec DSL in Elixir?
- Chris McCord “Metaprogramming Elixir”
- Macros to the rescue
- Yes! It is possible!
- ESpec v0.1.0 was released on March 25, 2015
- Current ESpec version is 0.8.16
- hex.pm package: espec
- GitHub: antonmi/espec
Do you think this is RSpec code?
ESpec - BDD for Elixir
- Test organization with “describe”, “context”, “it”, and etc. blocks
- Familiar matchers “eq”, “be_close_to”, “raise_exception”, etc
- Custom matchers
- Three types of expectation syntax
- “Before” and “finally” blocks
- “let”, “let!” and “subject”
- Shared examples
- Mocking with Erlang “meck” library.
- Async examples
- Doc specs
- HTML and JSON formatted outputs
ESpec Phoenix
- ESpec configs, helpers and matchers to use it with Phoenix web framework
- Is on early stage of development. Current version is 0.2.0
- Contributors are welcomed
- Hex.pm package: espec_phoenix
- Github: antonmi/espec_phoenix
Thanks for your attention

More Related Content

PDF
Flow-based programming with Elixir
PDF
Asynchronous Ruby
PDF
Massive concurrent modifications in web app. How to manage and test.
PDF
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
PDF
GenStage and Flow - Jose Valim
PDF
Intro to elixir metaprogramming
PDF
Flowex - Railway Flow-Based Programming with Elixir GenStage.
PDF
Elixir intro
Flow-based programming with Elixir
Asynchronous Ruby
Massive concurrent modifications in web app. How to manage and test.
Magic Clusters and Where to Find Them 2.0 - Eugene Pirogov
GenStage and Flow - Jose Valim
Intro to elixir metaprogramming
Flowex - Railway Flow-Based Programming with Elixir GenStage.
Elixir intro

Similar to Espec - Elixir bdd (20)

PDF
Crystal internals (part 1)
PDF
Crystal internals (part 1)
PDF
Crystal internals (part 1)
ODP
YAPC::NA 2007 - Epic Perl Coding
PDF
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
PDF
PHP is the King, nodejs the prince and python the fool
PDF
PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cin...
PDF
WebAssemlby vs JavaScript
PDF
[4developers2016] The ultimate mobile DX using JS as a primary language (Fato...
PPTX
My month with Ruby
PDF
Elasticsearch Basics
PDF
Archetype autoplugins
PPTX
Typescript overview
PDF
Using RAG to create your own Podcast conversations.pdf
PPTX
Post css - Getting start with PostCSS
PPTX
Introducing type script
PPTX
Building Your Own DSL with Xtext
PDF
Rust Embedded Development on ESP32 and basics of Async with Embassy
PDF
using-apache-spark-for-generating-elasticsearch-indices-offline
PDF
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
Crystal internals (part 1)
Crystal internals (part 1)
Crystal internals (part 1)
YAPC::NA 2007 - Epic Perl Coding
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
PHP is the King, nodejs the prince and python the fool
PHP is the king, nodejs is the prince and Python is the fool - Alessandro Cin...
WebAssemlby vs JavaScript
[4developers2016] The ultimate mobile DX using JS as a primary language (Fato...
My month with Ruby
Elasticsearch Basics
Archetype autoplugins
Typescript overview
Using RAG to create your own Podcast conversations.pdf
Post css - Getting start with PostCSS
Introducing type script
Building Your Own DSL with Xtext
Rust Embedded Development on ESP32 and basics of Async with Embassy
using-apache-spark-for-generating-elasticsearch-indices-offline
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
Ad

Recently uploaded (20)

PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPTX
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PPTX
Software Engineering and software moduleing
PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
Current and future trends in Computer Vision.pptx
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PDF
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Software Engineering and software moduleing
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
distributed database system" (DDBS) is often used to refer to both the distri...
Management Information system : MIS-e-Business Systems.pptx
Soil Improvement Techniques Note - Rabbi
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
August 2025 - Top 10 Read Articles in Network Security & Its Applications
III.4.1.2_The_Space_Environment.p pdffdf
Current and future trends in Computer Vision.pptx
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Ad

Espec - Elixir bdd

  • 1. ESpec |> Elixir BDD Anton Mishchuk #pivorak 10 March 25, 2016
  • 2. About me - Ruby Developer at Matic Insurance Services Inc - Big fan of Elixir programming language since 2014 - ESpec package creator & maintainer - GitHub: antonmi - Email: anton.mishchuk@gmail.com
  • 3. How the idea was born - We are from Ruby world - We like BDD - We like RSpec - It would be perfect to have RSpec like BDD testing framework in Elixir!
  • 4. Is it possible to implement RSpec DSL in Elixir? - Chris McCord “Metaprogramming Elixir” - Macros to the rescue - Yes! It is possible! - ESpec v0.1.0 was released on March 25, 2015 - Current ESpec version is 0.8.16 - hex.pm package: espec - GitHub: antonmi/espec
  • 5. Do you think this is RSpec code?
  • 6. ESpec - BDD for Elixir - Test organization with “describe”, “context”, “it”, and etc. blocks - Familiar matchers “eq”, “be_close_to”, “raise_exception”, etc - Custom matchers - Three types of expectation syntax - “Before” and “finally” blocks - “let”, “let!” and “subject” - Shared examples - Mocking with Erlang “meck” library. - Async examples - Doc specs - HTML and JSON formatted outputs
  • 7. ESpec Phoenix - ESpec configs, helpers and matchers to use it with Phoenix web framework - Is on early stage of development. Current version is 0.2.0 - Contributors are welcomed - Hex.pm package: espec_phoenix - Github: antonmi/espec_phoenix
  • 8. Thanks for your attention