A Guided Read of Minitest

Video in TIB AV-Portal: A Guided Read of Minitest

Formal Metadata

Title
A Guided Read of Minitest
Title of Series
Number of Parts
66
Author
Contributors
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
2015
Language
English
Producer
Confreaks, LLC
Production Place
San Antonio

Content Metadata

Subject Area
Abstract
Minitest is a testing library of just 1,500 lines of Ruby code. By comparison, Rspec clocks in at nearly 15,000! Why is Minitest so small? I'd like to investigate by doing a guided read of Minitest's source code.
Loading...
Reading (process) Software testing Software testing Machine code Reading (process) Computer programming
Programming language Real number Multiplication sign Flash memory Electronic mailing list Stack (abstract data type) Machine code Coma Berenices Line (geometry) Instance (computer science) Evolute Mereology Software maintenance Computer programming Programmer (hardware) Word Mathematics Process (computing) Computer science Software testing Quicksort Object (grammar) Task (computing)
Trail Group action Single-precision floating-point format Source code Software testing Quicksort Machine code Mereology
Trail Pairwise comparison Internetworking Internetworking Computer configuration Software testing Line (geometry) Machine code Spectrum (functional analysis) Task (computing)
Software testing Software framework Machine code
Revision control Execution unit Software testing Line (geometry) Machine code Reading (process) Library (computing)
Scripting language Multiplication Computer file Projective plane Function (mathematics) Machine code Line (geometry) Fault-tolerant system Machine code Formal language Process (computing) Single-precision floating-point format Software testing Data structure Reading (process) Library (computing) Form (programming)
Computer file Connectivity (graph theory) Core dump Total S.A. Line (geometry) Machine code Number Expected value Component-based software engineering Core dump Software testing Plug-in (computing) Hydraulic jump
Pairwise comparison Theory of relativity Line (geometry) Software testing Total S.A. Quicksort Total S.A. Library (computing)
Point (geometry) Line (geometry) 1 (number) Software testing Line (geometry) Machine code Resultant Number Library (computing)
Statistical hypothesis testing Default (computer science) Latent heat Computer file Different (Kate Ryan album) Multiplication sign Interactive television Set (mathematics) Software testing Object (grammar) Library (computing)
Channel capacity Object (grammar) Multiplication sign Software testing Software testing Machine code Power (physics)
Computer file Core dump Configuration space Software testing Configuration space Line (geometry) Instance (computer science)
Point (geometry) Metropolitan area network Word Connectivity (graph theory) Single-precision floating-point format Configuration space Software testing Machine code Quicksort Line (geometry) 2 (number)
Greatest element Computer file Ferry Corsten View (database) Execution unit Set (mathematics) Voltmeter Parameter (computer programming) Shape (magazine) Function (mathematics) Proper map Computer programming Hooking Different (Kate Ryan album) Oval Software testing Endliche Modelltheorie Contrast (vision) Social class Task (computing) Installation art Context awareness Inheritance (object-oriented programming) Block (periodic table) Expression Line (geometry) Machine code Instance (computer science) Variable (mathematics) Dean number Type theory Arithmetic mean Error message Pattern language Right angle Quicksort Spectrum (functional analysis) Library (computing)
Digital filter Computer configuration Term (mathematics) Interface (computing) Software testing Quicksort
Axiom of choice Digital filter Ferry Corsten Multiplication sign Source code Set (mathematics) Dichotomy Shape (magazine) Machine vision 2 (number) Goodness of fit Hooking Computer configuration Different (Kate Ryan album) Hash function Energy level Software testing Traffic reporting Task (computing) Sound effect Bit Machine code Line (geometry) Term (mathematics) Leak Symbol table Computer configuration Order (biology) Right angle Quicksort PRINCE2 Freeware Resultant
Trail Inheritance (object-oriented programming) Multiplication sign Cuboid Software testing Software testing Machine code Variable (mathematics) Local ring Library (computing) Social class Task (computing)
Implementation Parsing Thread (computing) Multiplication sign Source code Parameter (computer programming) Variable (mathematics) Revision control Array data structure Computer configuration Different (Kate Ryan album) String (computer science) Software testing Endliche Modelltheorie Local ring Curvature Social class Task (computing) Physical system Algorithm Standard deviation Mapping Projective plane Core dump Total S.A. Line (geometry) Machine code Variable (mathematics) Thread (computing) Curvature Internet service provider Social class Object (grammar) Reading (process) Local ring
Point (geometry) Authentication Software developer Machine code Line (geometry) Process (computing) Software testing Software testing Quicksort Library (computing) Task (computing) Directed graph Physical system Social class
Aliasing Surface Slide rule Implementation Service (economics) Ferry Corsten Multiplication sign Patch (Unix) Lattice (order) Regulärer Ausdruck <Textverarbeitung> System call 2 (number) Word Different (Kate Ryan album) String (computer science) Computer science Software testing Reduction of order Task (computing)
Pairwise comparison System call Matching (graph theory) Multiplication sign Line (geometry) Mereology Product (business) Expected value Message passing String (computer science) Software testing Data structure Error message Writing Task (computing) Exception handling Distortion (mathematics) Social class
System call Matching (graph theory) Block (periodic table) Software testing Quicksort Parameter (computer programming) Abstraction
Programmer (hardware) Channel capacity Computer file Multiplication sign Video game Software testing Bit Machine code Abstraction Hydraulic jump Computer programming God
Slide rule Software testing
a year. all these.
oh boy so by a is a great all the talk of the likely this year i am today. talk about many test i know in the program it said guided read we are going to read code the day this is basically a code reading talk. but as i was writing this talk i realize it's really about pain on and pain that testing makes us feel a sobering thought about pay a few probably could have titled this talk. nothing else many tested hurt me and i like that.
my newspaper back i write about full stack ruby apple for once in a perfect dot com performances my usual wheelhouse not like a testing guy i don't usually write about testing testiness sort of the last thing on on my code still improvement list sometimes. but many has played a huge part in my sort of evolution as a tester and as i'm going to show us a as a ruby us so that's why i wanted to come in and talk about it here you do that but the wrong way.
and so i started by telling your story of. i started learning program in two thousand and ten i was a college senior really was my first programming language i wanted to get a job and a big flash the start up and i thought the best way to do that would be to become a programmer turned out that was true. but. when i started learning really i use michael heart as real tutorial i had no computer science background and if you've ever looked at that you know my heart of his great job of teaching u.t.d. from the start but to use our spec and for a long time when i started with ruby testing was really hard for me i was. just getting started with through the i barely understood what i was doing with really to begin with and then along comes arse back and there's sort of like while yet learned described in its in all these other words that are spec concept are spec brings to you and says you have to learn those two and for was really frustrating to me. i found many test and it was kind of like a brand new day for me is like all just ruby i can just write whatever i want you might have heard this sort of line before have done anything the many test. i do the a.p. i was very simple and it was a lot easier for me is the beginning refused to write but. i can't promise this this task and i i wanted to start but an object i wanted to start. in objects instance method of and i was really frustrating because it seemed like there was no way in many test to do that. and up i went into the many test fire see channel and i said guys this is dumb. on spec makes it really easy to do this and why would you let me stop and instance math. and i'm like more of the maintainer of the many test rails gem among other things.
keep going to action here said was because we already have a ruby to call the singles in the house like it. what's you do that now and that's sort of started this long love affair with many test where many just kept showing the parts of ruby that i'd never looked at her i never understood. and so by reading many test source code. we can sort of reengage with through be in this way pain feeling the pain of all it's really hard to do x.y.z. led me to learn something new about rudy is a talk about many tests in the last code track so i do have to address the elephant.
in the room and that is our spec. i think the original. a sea of p. years something for this this conference this track specifically said that less code was like five hundred lines or last many jazz is not that small but it did i do given the less code track anyway and i think it's because we all understand that many test is small in comparison to the other option. since that we usually reach for when testing in room be but i'm not here to play internet fight i'm not here to talk about our spectrum hear talk about many tasks but and and to get totally out there and it's pretty obvious i came to give a talk about me as i am any tax guy and so i want you.
did it take everything insane here without grain of salt in mind i don't want you to swallow everything and i'm saying here just wholesale.
but this talk is about the philosophy of many test revealed through its code and up we can't really talk about that without talking about our spec because a lot of what makes many tests philosophy so interesting is what it doesn't do and we can talk about something doesn't do without talking about something that does it.
and that way i think many test is his best thought of as a reactionary testing framework. it's a reaction to other kinds of or other styles of testing.
but but have a history lesson here the original mini test was ninety lines of code ryan davis sitting up right here from was was nice enough to resurrect that version for me and it's available there at tiny year old accomplice original many test for an interesting read.
and if you've ever wanted to know what been terrified feels like it's talking about someone's library whether sitting in the front ho hum.
and minus another common stocks that that it was originally replacement for test unit he sat down of was saddled with the maintain or ship of test unit thought it was too complicated even understand and wanted to see if you could write something that did were testing it does but unless coat and from that beginning that we have.
many to us that we have today. before we actually read a single line of code though i think you can learn a lot from a projects file structure and its general light where its lines of code live and how many there are so before i had to dig into a library i think the one of the grace as you can do is open up clock. school library for accounting the lines of code to project its smart enough to break things out by file to break things out by language of multiple languages in a project will say old is got ten thousand lines a ruby and five thousand lines of jobs scripts and so on and so on. and if we apply clock to many test you get this kind of like crazy output but the gist of it is a mini test has one thousand six hundred ninety nine lines of documentation in the form of its read me and all the non blank comment lines.
and just one thousand five hundred eighty six lines of recoat that's also blanks removed. that may be sounds like a lot i guess the thousand is like a big number but now let's take a look at something else so our respect as for major components many test lives in one gen.
there are because of huge plug in infrastructure but the a few gentle many test there's no many test dash a million other things that are required. our spec has four major components that it required when you add are spectacular jump file that is our respect core expectations mocks and all three of those depend on something called are spec support in total that is one thousand five hundred eight hundred while forty three lines i just messed up saying that but it's a lot to big number and still be.
katie say. it's many tests the entire library is about as big as our spec support library so many test is about one tenth the size of our speck in total may test was the mouse in the motorcycle by beverly cleary are spector's ulysses by james joyce that is literal relative size comparison.
i'm not sure how far that metaphor goes but lyses involve some guy getting plastered wandering around and not much happens which is sort of described as my experience we are speck in preparation for this talk.
so that's many tests philosophy point number one do less with less and you don't go from fifteen thousand lines of code two thousand five hundred just by cutting out like waste and been a better ruby us and everyone else you get by cutting scope. and so when we go in and start reading many tests were going to be looking for the things that need to have doesn't do.
and as and another good example are spec includes one thousand six hundred thirty nine lines of for matters just for printing your test results on there's h.t.m.l. for matter jaison for matter whole bunch other ones that i don't know if they do. but many to spend this its entire library do our spec does just to show you what it did have.
another so we often not i guess respect mocks and this is a this is a particular example i think of of a difference in priority between our second many test is twenty eight times larger than many test included mocking library use any mocking live or you want with many test but the one that's. could it is this many test mocked are the file and that is twenty eight times smaller than what our spec include by default so without even reading mock dot org be or reading are stacked mocks i think it's fair to say that many test is a statist testing library that many test is.
not unlike the stalling way but in the status modest. testing philosophy the economy it if you don't know what i mean by that i think the late james call it said it best a status tester asserts that a method returns a particular value a mock assessor asserts that a method triggers a specific set of interactions with the objects dependencies.
and of this is no moment of so we know that if many test is going to provide us twenty eight times less mocking power in capacity than ours back is mocking in many test will be hard we will experience.
again with many has like i did when using test doubles mocks stobbs and i think many test is trying to tell us something without is trying to say. don't do that. if this is hard maybe try something else maybe you should try code that doesn't need this doesn't need mocking on.
so that was kind of the first instance of i think many test using pain to put down a particular testing encoding path. and here's another the largest while in our spec core is configuration dot are be as seven hundred fifty eight lines again roughly half the size of many test in total the largest file in many test is many test darby four and forty six lines.
of and what i think many test this kind of saying here is that configuration maybe this is like sort of the old rail saying that we always word like and convention over configuration i i've been trying to run with this pain team here so i think it's many test knows what's best for you better do it down it. configuration is not a huge component in in many test when compared to reading our spec out many test is extensible. and we're going to see that in some of the code that we read years second but we should not expect a huge amount of of of configuration or. that sort of like a you know studying the ins and and that and that sort of business and ryan is called this turning testing up to eleven i would say it means that many test has a testing philosophy and it would like you to adopt that when using it it's designed to teach you a certain style and that style is not necessary. really up for debate when using many test its expendable but it's not really configurable and i would contrast that with our specs approach which seems to suggest that anything is possible with our spec there's all these books there's always configuration points ways to make our spec do whatever you want to and. you can do that with many test but maybe a little more painful than our spec. and maybe you should think twice before doing that.
so i knew everything nate you've talked for about fifteen minutes now we have a look at a single line of code and i agree so let's talk about many test how does it work.
and here's a typical all extremely simple many test passed a. i want to call your attention to the i guess sort of concepts or like big. things that were many test is going to require you to understand to use many test. we require something ok cool like i'm a realist i know what requiring does or maybe have some idea there's a class are right to use those before seen at once or twice it inherited from something called many test test so that's interesting need to understand what many test test is and what what it's going. of us as soon as we inherit from a class right going to get all that classes method so you know any test as could have a million methods and now we're working in that world so who knows what happened there and then we had death with a method which is test the truth i could make a bigger example here but if you had a. a larger many test task you would notice that every method or most of the methods started with past underscore something so that's interesting probably has a meaning that we should look for in the code and finally got this method which probably because we can guess there's a inheritance hear a certain equal probably come to many test test. which takes to parameters and so those of the concepts that we're going to be looking for dean into the code if we run not file just with ruby command line tool we get all its output we don't know how that output shows up so let's start from the beginning requiring many to. best slash bottle run and my guess would be that i should go looking in many tests library for a mini test or for an r. and r. be filed in live but many test auto run which is exactly what i find slightly simplified i cut some stuff out of the beginning here but this is what that file. looks like it just requires some other files which is great we know how that works and up calls many test auto run well where as many test all run live. he lives in many test out our be which was what we might expect if we are looking for a class method on many test and it looks like this. now you anything mate i thought you were trying to sell me on many test was the simple test the library look at how complicated that method is. and i think that's interesting and i i had that same initial reaction look at this code and up i want you to pay but so is right but i want you to pay attention to the shape of this method like if you stood here and squinted and just paid attention. into art it's about ten lions it's fairly sequential there's not like there's one sort of long line here but otherwise pretty short and there's just one method here right i think yeah like there's only one other many test method that's called here. many test out run we've got this some some room he stopped here like adds it were settings of variables this up but there's only many test dot ron thought pattern is going to happen a lot more as we keep reading this library and i think that that pattern is in great contrast are spectrum to get to a second of all. all many test is doing here is installing it adds a book if you were wondering from the previous example how does many test no to run our tests it's required before we defined any of our test so how does me to know where our tests are and how to run them. that's because when you're program runs there's nothing to do because there's no like code execute there's no money to start run at the bottom of your task file. so your program just six and when it exits basically we do some other stuff and then called many test run nine tenths of this method is defining some. stuff to give you the proper unit exit unix. code but really the meat of it here is his many test out run if we just sort of it. collapsed. the ad exit block here it would just say add eggs it do some stuff unless class variable install the exit then started to true clearly just meant to prevent this writing them at the twice find not complicated. this is our spec does that. not that much more code may be like twice as much code little he just does the same thing installs inadequate hook. but i want again i want you to pay attention to the shape very different very interesting. one two three four five and i limited like five other methods that are expected fines to. carry out this whole add eggs that process. this is interesting you probably can't read this down here but the disabled model run class method on our specht just sets the auto run disabled. instance variable to true that's an interesting pattern that you don't see anywhere many test i think it's a very interesting. expression of this is what our spec considers readable verses. what many test considers readable many test says your ruby us you know what this means it means that we've installed something at exit. and our spec says well we need to ask we need to put that behind of this access or that we've written here very interesting you can see that a lot. and it's also kind of funny are spent does all this to install is at exit book and tells you not to use it because they want you to use the are spectacular when you type are spec whatever filed are be there is no test run are included in many test how you just use the ri command line. your face although there are plenty of many test compatible test runners like the one you use and rents. of that's the better view of it example i just gave me there again very interesting differences in opinion on what is readable and what's not. so i think that this means that many test is trying to tell you that many test things that you should do simple thing that could possibly work.
and i want you to know the differing philosophies here on simple are speck in terms of its its test interface as well as the think that simple is up english readable or looks vaguely like english. and that's sort of the whole spec syntax mindset but i think a lot a lot of ways many tests as well you're really is really simple. just the ruby. of at the end of that.
at exit hook that we install the earlier you remember we called many task dot run and that's what determines the access code is let's look at me just run.
a. right so right off the bat before even get it again look at the method shape your very different than a lot of what you find in our spec. and i picked i'm kind of picking out some of the most complicated stuff in many test like this whole stack of me just goes this whole stack of methods before actually runs your tasks its kind of the more complicated stuff and many test there's a lot of course that's a lot simpler than this but right off the bat before we even get to the second line here. check this out self-taught run reporter options where the hell the parentheses here ryan what were those go. so let's talk about seattle stop a little bit for the uninitiated cialis style i think has a lot of different definitions for the purposes of this talk i'm just going to say it's it's sometimes interpreted as don't use for the method definitions sometimes you go further and say don't use premises except where absolutely. really necessary. which kind of lead to some interesting style choice it's not super popular of it. david brady gave this great example of of parentheses usage of i'm going to profits this by saying this sort of. code that you're looking right now does not exist in many test is not something that you'll have similar that you would see him many times i'm just making this up we've got. how she got fat sheekey the lead and then puts right i agree that parentheses makes this more readable right parentheses are sort of like this like tunnel vision you can say at what the innermost parentheses here ok the food is simple all right let's go out one level ok how. ashok fat showcase we're going to fetch the food symbol from this had shot right outside of the next set of princes are right or a dot the leak ok we're going to leap that thing from under a got it and then we're going to put it this free ok fine. but maybe that's not the dichotomy here maybe that's not the up. reason that we're not using parentheses one of the code look like this and it's this is a contrived example so i don't think it plays as well but i can think of other have a good actual code example for this what if we blew the original code out into three lines instead did something like actually described with the thing was that we were. getting out of this happen. and then putting the side effect on to a different line just an idea i think this is a lot more readable i think it might be interesting i honestly never consider this until i read the many just source code all the way through and might be interesting to. take parentheses out of your code when you're writing it and then see what that makes you do what does he really could have to look like when not using parentheses in order to be readable is that result more readable than using parentheses at all an interesting exercise i think i know. to be doing that in the future is to see if i like it.
so what i'm trying to say with all this is that i think many test has a philosophy that pain is good. and we can navigate. are coping with pain we can use it as a kind of signal as a kind of why feel pain here so what does that mean what should i do is there were a way i can make this go away without just hiding it. for it like i did talk of the box example i think what many test the same there's mocks are painful here try writing code that doesn't need the box a rather than coming up with better mocking library or a lot of mocking library that makes this code easier. on many test also makes adding assertions very easy to talk about the second what it's doing this i think it's sane it's trying to give you the opposite same while a certain making assertions are easy and many test so i am encouraging you to write your own assertions are spectator. the easy but makes it difficult to understand. seattle style can encourage the use of local your local variables intention revealing method names. and perhaps i think the seattle style tries to suggest to us parentheses are sometimes a band-aid on a problem that we should fix without them. so i've kind of outlined how many test starts running your tests on how does actually know where your tests are how does it know how to run them.
up many times has this class of rubble which many tasks hast inherits from this of rubble and basically i've committed to a code from rubble here but all it does is keep track of this class variable rivals simple.
off and and then you see this method class method inherited which just add something to the rumbles a ray and then call super i've never seen this before so i took a look at up i like first search through the project inside wall where is inherited to find it's not in the project ok well must be some. in room he inherited his a callback that you get for free i think it's on class might be a model of as just called any time that use a get a new subclass to find this is just straight from the really documentation is example if we subclass flu. this method will get called with the new subclass as an argument so literally all that's going to happen here is my test. will get past as an argument too many to as one of all inherited which will add it to the bottles are a eventually many test looks at the many testimonials or a for all of the task classes that it knows about and just run through them one after another. and not talk about test every hour specter in a time of it. standard live is used very heavily in the many test source code we see things like option parse or thread new tech string i know ten file. and in something i can say really seen before many tests will use your system difc tool when printing the different or the difference between two large objects like you assert equal some huge array some other huge array in the one thing in a huge arrays. for many test will use dip to figure out which thing was different are spec implements their own version they are spec implements that in ruby and intestine said says while i'm just going to use what provide.
i'm interested me a lot of our speck in re implements a lot of course standard live classes they have their own version of set they have their own version of flat map use their own version of thread local variables and they even have their own random and taishan some of these i understand. but these two i think every version issues not sure about from local variables with readings a total you know your hands up thing rubies sell baby is a good reason for that ran i don't know i was looking at i didn't going to put the example in here but. our spec uses its own algorithm for setting at the random seed it in your tests week there was some code comment that this implementation that they use like just somehow better that's set and better somehow i don't know.
so i think many test as a philosophy to use what is given to you to use what is given to you by the system to use what is given to you by rwe be itself. that's an interesting philosophy that i think is is something that we're really not used to as really developers and i think it's to our detriment a lot of us have a kitchen sink philosophy when it comes to our gen files out if there is some library that will save me ten minutes of effort that i can put my job. filed and i will do it devise i think it's kind of the worst offender here not because devise a bad library because we use device to do simple user past name authentication that we could just write ourselves or use rails facilities for that and be done in a in ten lines of code on anyway. so i think that's an interesting philosophy point from that we can take out of reading many test so how do we actually define a a he of the icing test year yes i do we define up a task how do we define the we have to say a class while a sort of.
a collection of many many different things we want to test in in many test how do we define one of those this is in the where is this many test tax test out our be of its call them into start run which is on a previous slide we ask a mini test test subclass. before it's a rateable methods we say to your supply us please tell me which methods you would like me to run them on many test test that the. is really this is all just ordering them it's just this that methods matching some raj x. which is just matching test underscore the methods match one method is literally just have one liner that basically just calls crap on the collection of methods and brings them back as an array of strings up. so really it's just ok will attest in a test in many test is just a method that starts with test underscored also interesting i think that this is not configurable there's no you could monkey patch of course but it's not like some there are some put provided that lets you change out that regular expression. in very different in our speck on our respect has been what i can tell thirteen different ways to define a test or an example. granted they do a little different things in our speck of but there are three to do exactly the same thing example in specify there's ways to define a task while also focusing and skipping at the same time and there's also a pending example pending apparently has some other semantic meeting in our spec and this method here. there is also provided for you in our spec so you can do this yourself you can say well i want up the smiley face the mo d. to define test method you know in my respect us so i can do that on many just says it doesn't matter just do it this way it's fine. there's maybe some reasons for this but if you don't think that exit been a way to skip a task because of i don't want to change her ex you get used to do that if you did that doesn't matter to you then maybe our specs driving other things that don't matter to you. about this is the the our second implementation of define example method does this thing called item potently define singleton method i'm not a computer scientist so like i don't really know this word means i was single and that it is but i don't know why they didn't just do that instead of calling this other method that i guess doesn't for me. we have there's some met a data and unlimited data is and will decide understand examples out there are some examples here we're adding example there that that's cool. very different approach.
and so what i think many test is espousing here is to reduce our a.p.i. services let the user to find their own aliases if they want and make it simple to do so and i think that goes along with limiting figure ability.
khan running a time you're ok. yet just just talk faster and eight but let's follow distortions really quite this is an example surgeon many test. the structure is you can say see is really simple if you look at many test assertions darby they literally all look like this they're all like three lines out eight defines a message that we printed if the assertion fails and then makes an assertion using the assert method. so many test doesn't really provide any facility for writing your own. assertions it just says do this on your own tests just opened up many test test or open up your task class and write something that looks like this there's no specific facility like we are specter vied to define a new assertion are matters as ours. but calls them this is what is certain looks like not any more complicated we incur meant our searches count by one and then run the tasked the thing that we wanted tasovac returns true we just keep moving and if it doesn't return true are going to raise this special kind of exception which means. details of its own way i don't have time to get into that unfortunately. and you might have noticed your that messages approx which is sort of interesting maybe a little more complicated originally it was just a string. if you think about it if we're calculating the error message every time we run the test eventually it's going to get very expensive so by putting into a product we can only calculate an error message when we actually need you don't have to do that when writing your own assertions because if you if it's just a string or whatever. many test will just printed and you don't care about that and some big problem for you. and the way that these give included into your task these assertions is we just include the assertions module in many test past we've all done not one hundred times no big deal are spec i honestly have no idea how they do this.
x. the expectations gem itself is like three thousand lines in there should have matches which is another six thousand lines i just i really honestly i sat down and read our spec to try to give an honest comparison this talk this part of our specter i could not understand.
of the this is the facility that are specter vied for defining your own match ers it interesting other this is this is very characteristic of our specht it reads quite well if you like read out loud in english but these are all sort of new concepts which you have to go learn about understand. and how they work out just to find method where this match method comes from i have no idea and what these block arguments are actually doing i think are all questions that you have to go ask our spec about whereas.
this use a module and call this method that raises many test assertion that's pretty simple to me i guess i'm why think many to say is that extraction is the enemy of the pain here is that you will have to write your own abstraction sometimes i think that's ok i think that makes us better room.
the us and i think learning to write obstructions well is one of the greatest skills that we can learn as programmers and god forbid that you learn some ruby along the way rather than learning how to better use our spec to extend and use many to. asked in a greater capacity usually just had to write more ruby. we are expecting have to learn to use our spec better because d.s.l. that it's got to interact with.
so i think i hope this is shone through little bit of code not as much as i would like that many test and a lot of ways of philosophy about pain we see this to me and maybe you had pain with many tests in the past maybe if you think back. and on time that you had struggled with many test during time you fly with really really on. did you just give up and go throw to devise a new jump file or go throw. whatever jan you thought you needed to get this done without you having god forbid having the right anymore code on. or did you listen to that pain and if you think about what that pain was trying to tell you on i think in programming like life what doesn't kill us makes us just that little bit stronger. thank you that has been my talk.
these go read many test if you haven't it's really easy to read and. protest more. on the mice lives are available at that you are all i guess i have five minutes so if anyone has any questions. no cool thank you for listening to me up forty five minutes per should.
Loading...
Feedback

Timings

  460 ms - page object

Version

AV-Portal 3.20.2 (36f6df173ce4850b467c9cb7af359cf1cdaed247)
hidden