Assertions

Summarized using AI

Writing a Test Framework from Scratch

Ryan Davis • May 04, 2016 • Kansas City, MO

In the video titled 'Writing a Test Framework from Scratch', Ryan Davis discusses the essential components of building a test framework, focusing on assertions—fundamental elements necessary for verifying the correctness of code. Davis, a prominent figure in the Ruby community and author of a popular Ruby test framework, guides the audience through a detailed, code-heavy presentation aimed at teaching the intricacies involved in developing a fully functional testing framework.

Key Points:
- Introduction: Ryan Davis introduces himself, highlights his background, and sets the context for the talk.
- The Importance of Assertions: Assertions are underscored as the most critical part of any test framework. Davis explains how they are constructed and the implications of their failure.
- Interactive Learning: Emphasizing an engaging approach, he references a quote about learning that stresses the value of involvement in the learning process.
- Code Focus: The talk is intended to be heavily technical, with an abundance of coding examples and explanations, showcasing how to build each component of a test framework step-by-step.
- Resources Provided: Davis mentions that slides and a code repository have been made available for attendees to further explore the concepts presented.
- Final Thoughts: By the end of the talk, the audience should have a comprehensive understanding of how every aspect of a testing framework operates, from assertions to the final structure.

Overall, this session not only teaches how to write a test framework from scratch but also instills a deeper appreciation for the mechanics behind testing in software development, encouraging participants to dive into writing their own tests with confidence.

Writing a Test Framework from Scratch
Ryan Davis • May 04, 2016 • Kansas City, MO

Assertions (or expectations) are the most important part of any test framework. How are they written? What happens when one fails? How does a test communicate its results? Past talks have shown how test frameworks work from the very top: how they find, load, select, and run tests. Instead of reading code from the top, we’ll write code from scratch starting with assertions and building up a full test framework. By the end, you'll know how every square inch of your testing framework works.

RailsConf 2016

00:00:10.460 Thank you everyone for lasting so long. I know it's been a taxing day. My name is Ryan Davis, known elsewhere as SunSpider.
00:00:16.860 I'll be talking today about making a test framework from scratch. I'm a founding member of the Seattle Ruby Brigade, which is the first and oldest Ruby Brigade in the world.
00:00:24.390 I'm now an independent consultant in Seattle and I'm mostly the author of many tests, which happens to be, according to the Ruby Toolbox, the most popular test framework in Ruby.
00:00:31.290 I mention that because I'm astounded that I'm beating RSpec.
00:00:37.070 Setting expectations is something I always do at the beginning of my talks. This is a very code-heavy talk.
00:00:42.240 I'm going to go into detail about the what's, how's, and why's of writing a test framework. I've got a few slides coming up—29.4 slides a minute—if I ignore the 30 minutes that I'm supposed to talk and go to 35. So I'm hitting 9.4 slides a minute.
00:01:00.090 I've given this talk twice already and it's been recorded and published, so you can watch it there if you need to. I find that adding more slides adds more explanation and comprehension, and generally makes the talk go smoother—as long as we don't have AV problems.
00:01:12.480 The presentation has been published, and the slides are available at the URL above. There's also a facsimile of the code that I will be presenting on GitHub.
00:01:19.950 First, a famous quote, not said by a famous person: 'Tell me and I forget. Teach me and I may remember. Involve me and I learn.'
Explore all talks recorded at RailsConf 2016
+106