Merken

RSpec: It's Not Actually Magic

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
and and hand so I'm here to talk about what is certainly the most kilometer non-controversial Germany the entire roles ecosystem of course our spec not exactly this everybody loves us
back right and right after this Ryan can come on you talk just about how much he particularly rules are respected and in the meantime I'm going to fulfill my role here and in set of all the things that he's going to say in the next talk us so as said everybody loves artifacts but I
ask that offends me esthetically with no discernible benefit our I respect is a chemical but these also by the way and let you think this is a new argument in any way shape or form this is uh from March 2011 I so this is a debate obviously that's been going on for a long time but our specs complexity its utility on and I'll just like all own right here like ah spec is
complicated I'm not a member there the core team I didn't write any of it I use it all the time but I have no ego 1 up and saying that it's anything in particular it's complicated internally the internals of the complicated and while I do think that it
has benefits are discernible and I would be happy go over that some other time here were mostly talk about the complicated part
so when we talk about our specting complicated in the things in and talk about here today are not so much the complexity of the domain specific language that it was presented to developers were writing tests using it but that the internal complexity of it and I respect of the common reason where
spec is complicated and I suspect there's the odds the core team would talk about how expressive respect years and uh how much trouble there's a lot of stuff in the our spec codebase that is there specifically to allow you to express your tasks in a way that is closer to natural language than it is to straight of Ruby on a lot of the complexity of are spec internals goes toward supporting that of our specs also very flexible it supports 2 completely different syntaxes because the deprecated version 2 syntax is still where army runs in a lot of different under a rod different Ruby a larger versions of Ruby in a lot of different contexts a lot of different machines and obviously that's true of all popular frameworks as ecosystem but that has a certain cost in terms of the internal complexity of of the code based on and in big it has features that other test libraries don't for good or for it or l it has them I has a full-featured a very full-featured mark framework attached to it has a very full-featured matching framework and if you're in JavaScript you easily could be doing that with 3 separate libraries and our respect bundles them all together just the top
of here with 1 quick example of how flexible our spec is but I do want say that with about 10 lines of
configuration most of which are things that are exposed by the hour spec API out I was able to turn this of
this is executable our spec with my configurations I'm now thumbs-up emoji to describe eyeball emoji to get a point emoji to expect and hokum emoji 2 equals of 3 of those 4 I did using stuff that is exposed by our spectral talk about a little bit on but yeah I expect is like it's not specifically there the flexibility is not specifically there to support emoji back but if you want to do it it's not that hard for good or bad so this
is our spec it's not actually magic my name is more rapid I work in a consulting job of called table XI in Chicago I have stickers and we are hiring and if you wanna talk might either of those things you can find me and that's where where the green putty hi everybody it's so hard to this so the center glare that I can't really tell whether there are people out there there are people on the right by people cut so looking at some hour spent
source code from the actual our speckle based current get hub master as a couple days ago so this is your last chance to bail all before we start looking at our speckled close up about you have sensitive stomachs or something like that you know how fast your seat belts mixture 2 tables are in our brain like position don't over your eyes of
but I do want to say like why why is
important or why do I wanna talk about the internal controls are expected the I don't I the it is possible that some of you will come out of this learning a little bit more but I expect as a user you will probably pick up a trigger to you can use in urine testing on that's not really why I'm doing this so I spent a really interesting example of a domain-specific language written in Ruby and hasn't techniques that you might use if you wanna try to write your own DSL and as a really why I wanted to do this either on really like I've used our spent almost every day of my professional life about the past 8 years and it occurred to me that I really didn't have a serious idea of what it was actually doing and I thought that was worth rectified of just because I really I was really curious and wanted to know so that's 1 4 here hopefully you come out of this a little bit more understanding of of our specs internal so I always tell people that technical talks even technical talks to
tell a story other should be a beginning middle and end of my story I guess is out once upon a
time there was a test and we'll go from there are this is a minimal ask that task that is about as small as I can make it and and still have it like recognizably do something and we'll walk through the stages that are spent goes through to convert this 1st to internal representation and then to execute their representation and turn it into a pass or fail no so this kind of looks like a pneumatic remain a kind of doesn't 1 of the things that I find often helpful when you are in Ruby exposed to a domain-specific language or something like that that is trying to look a little bit different than normal Ruby on this Estado parenthesize it can fully qualified if you do that
you are come up with this this is what happens so there are a couple things that we can see right off the bat there are very clear once we parenthesized qualified this we see that described is a method that takes 1 argument and what that argument is our constant name we see that it is a map calling out the self receiver there it's a method that takes 1 argument here and what and on the last line so we see that expect is an argument is a method also or whatever self is at that point i take whatever comes out of expect our is an object that expects to receive the method to aid the method team takes as its arguments something there that gets called the gets return when I call he Q but it was worth noting that it expect EQ are all defined in terms of whatever self is when those are good when those methods get evaluated it and those are
the keys of the keywords of our spec our specs internals are arch-texture DSL we have described it I expect and then EQ being a representative example of our specs matches and so
do we have described it expects to something each of those matches each of those are maps to an X 2 and integral object of class inside our stack so
described maps to an the concept called example group of it maps to an example expect the maps to a something articles in expectation target and then the 2 at the end of something last because of matches are very familiar with our spec in terms of a user having you probably heard example and matcher are many may are for example Grouper expectation target is a little bit about last use by the public face of the of the of a library I
so just to serve sketch that in terms of so this is the air this back of the describes defines the example group in the example group sort of encompasses the entire described block that is that that is the argument to describe the our sort of under the auspices of that example group but it is the of object is invoked by it in covers the block this past it each individual collocator his own example on from the expects its argument are the expectation target and then the matter is that self-study q so we walk through this last step by step in terms of our spectrum terms it it so it
starts off when hour spec execute that code when loads at the 1st thing you hits as that described i which creates an example groups and describe our is a method it's defined it's actually defined somewhat indirectly as a class method of example group to create new ones of 1 of the things about the odds that code base and the aspect codebase examples in the show you is that most code and I respect has at least 1 more level of indirection than you would expect so in some cases I'm gonna show you like something that is along the way of the artist the call stack and not exactly the method that you think you calling because it's actually defined in terms of something else on to describe is action there's no place in the US but could as we'll see deaf described are spec free as a method called like define example group method and then describe is defined as a is a is an instance of that or a example that an aliases the examples to describe other description which is typically a string or a constant and then metadata from which is a set of keys are key value pairs which were makin we talking a whole lot about except that I respect to sort of hold on to them and can use them in its l'exécution would describe what happens when you call described is at odds that creates an anonymous so as an example group and then executes the block argument in the context of that new anonymous subclass so here's a piece of
that code this is from the part of example for this is sort called along the way and that example group gets created the 1st thing that happens here is of you see that were using Ruby's class that new to create a brand new class the parents of a top level described his example group itself and as you NASA they become subclasses of each successive successive nested of example group own once you have that some class it calls out to a method called set it up of which you'll be surprised to learn of some set up specifically it mixes in the matcher and the package so if you're not using our specs mocks like that's where it gets mixed in and then I ask that uses the model exact Ruby function so to execute the block that block argument if it's there and hold on to that thought for 2nd and and then it defines some extra helpers and then returns a new class what their returns an so nodes
that yeah Our model is that is Ruby it's 1 over a sure a trio of models that class exec in instance exact and what and those are very frequently used by domain specific language implementations to control How will block gets executed and make a block not get executed in the context where it looks like it's been defined and specifically model exact a has the receiver this is the examples examples actually from the recorder argumentation module executives in the middle it has a receiver and they are in a black and when I call model exact that block is executed in the context of the receiver as a class and what that means is that for the purposes of module exact inside the block self resolves to that outer of object and it treats the content of the block as those inside effectively inside a class definitions so in this case by defining a method the end I'm effectively reopening the thing class affine method inside that so that was the model Exact Call was done I can create a new thing call that whole method on it and that will work so in our and if you look at what that means in terms of what the the code our spec code that we are looking at I so I
described turns this example group subclass and then we model exact that up in that block is where we have before wars and after is in its and that's what gets executed our spec In the context of so that of that some class so when I say self dot it and that that self inside the walk out of the 1st example of subclass it is a method defined on that subclass as it is but before or and let all those things are all methods and on example group to get executed here when I respect of this model that so so we hope we call the method in and it in our
sky terms it's an example object there are a number of different things that are defined to be able to create example objects on Monday and I respect that defines a generic with method of method and then defines it and specify an example of as as aliases that 1st as versions of that uh it takes as a description amended us a metadata again and what and what happens when you call that is there are stuck old London that example object in the block and and this to an array that is a class action and that anonymous example group class that we've all the weed that is its parent example group so here is a piece of this
code of you can tell that it's kind of several layers of indirection did because I haven't even give you the method name here but this is part of the code the gets executed as the example gets created from the article from the aspect of this but we have a bunch of stuff here that handle some bookkeeping metadata of this is also where if you specify that this could that this example gets get is racket handle on the basically what happens here is that we ask that creates a new instance of this example class it the arguments that are self which is the example group the description of the metadata options and the block of it attaches that to a examples of property of the group class and then returns the newly created example so that point Our spec is now loaded all of the things that useful but it's executed the block of inside the describe it hasn't executed the block inside the it but holding on to it so at 1 time are spent actually creates an instance of that anonymous example group class are and then the new instance runs all of its and rules and that happens in 3 stages the example
group has a method that sort of goes through all of the examples that method spins off to a new method to a method other runs each individual example and that method spins off to the example itself to actually handle it some more so let's look at some echo so this
is a little smaller museum in a 2nd but this is the this is the A. what gets called an example group when it gets executed and and it is about 3 or 4 stages to the 1st stage here just sets up stuff diverse vectors already decided was to quit out it just bounces right at the top of it tells the reporter or the formatter that example group started his group before matter might do something in response to that book Our and then it looks for context works for any of its descendants mostly this messages bookkeeping inside of begin block our it then looks for a action is the before method if there if any exist on and that 2nd line there 1 examples were limit because that's where it actually starts to run all the examples once all the examples of are on that that method returns a true or false it looks for nested children and runs all of them and determine the true or false the entire group besides owners group at own pass or fail status and pass fail status molds children to results for descendants and then it handle some exceptions but it skips there's escape declared it bounces out of the bottom exception here is a book called if there's actually an exception in a beginning blocked or something but it it goes there are of Intel's are Spector was acquitted 1st because it fell fast mode from that returns false or of because the that's fails back and then at the end no matter what is happening the assure into it runs all the after looks and it tells the format of the some of the example group has a formatter again might do something in response so it's only this 1 line so
who was supposed to be this 1 I'm run examples is the thing to zoom in on but to see what happened when it actually does for each
individual example and so this is the code that actually the hand of all those examples the 1st line there that ornery strategy water edible that has to run in and apps them so we're gonna get a true false for every individual 1 of these examples by using MAP and so uh 1st it bounces again it er spec is decided it wants to quit and it creates a new instance of the example group for each test set any is for set up and then defers after the actual examples of find come and if if the if that examples fail and we're fell fast mode that our specs tells itself the wants a quick and then returns true false if it succeeded if it has succeeded or failed and uses the all method at the map will return a list of trues and falses and the all method will return true for all the individual examples tree so that's that's what the example group does when the individual example gets control it 1st checks to see that it's not pending actually should run it runs its before watcher of production
pressure put the code up of the checks to see out so 1st of all runs any before books In many it this is the part that actually runs the test like after you know were like 45 slides in this of this is the part that actually runs the thing that we think of as the test so it creates it takes an instance of the example group and instance exact that block inside that inside that a group if it's pending would we stop we break out if an exception is raised because the test failed we hold on to that exception because we're gonna need for reporting on and and we're on the cleanup if there's cleanup and and we finished which passes or whether this is passed or failed to the formatter again consider 1 put . enough or do whatever does skeleton
of what this is due in for were blocks but inside that it but it actually has to do something to determine whether the suspect has passed or failed which are spent does with expectations and with matches it so that voted to test that
line of code in this test is of the the expected what we're expecting something to equal something else and that expect method it I call that expect method takes an argument which can be arbitrarily object in a returns in our respect object called expectation target the out the expectation toread basically all it does is a response to to
you in a response and not to to determine how it handles the matter that's been called with 2 would not to both take our spec matches
as arguments and evaluate whether those matches are actually match or don't match the
matter at its most simple is just an object the response to the API is matches question mark tell are specs that with what we had there was to E Q the Q method which is defined
EQ is 1 of several built methods spec defines a model called our spec matches their all these short cuts methods that are basically are just really thin wrappers around these matter objects in this case the match object is called built in EQ all the things the user's default our spec matches are defined in this 1 aspect matches file by and most of them simply defer out to a more complicated object handles the actual matches so if we resolve both of those pieces we
wind-up with an expectation target object that using its 2 method and it's being the argument there is the matter the EQ matter which also has its own argument in the EQ matcher determines whether it matches or not by comparing whether the 2 values has been called with are equal so what happens here is that that expectation target to catch the 1st a method that eventually calls match for the actual matcher yeah In this case a returns true the 2 strings are identical the matcher boils that up as a success but because it's been done because it's been called as because we've used to so we're using for it were looking for a positive expectation it blows up as a match it succeeds I've we've been using not to it would of that matter would still of matched but the expectation Torre would consider that to be not the result are looking for it would raise an exception that would have gone to the reporter that would held that that the example group would held onto for final point so that's the flow that's the basic that have been not really the basic anything but that's the workflow ask that creates these example groups that create the examples that use these expectations and matches to but to determine whether what you with what you stated as at your expectation is actually our carries there's 1 other trick that we talk about here for our specs matches out which is the
implicit matter so our spec has an implicit matcher where he do B underscore anything as so he in this case the endospore value by it differs to 80 of predicate method of objects in this case it would look for a valid question mark on my name object the way that works is it a
method missing here's look here's the code inside our spec matches model there's a method missing which is invoked because be valid is not
defined anywhere and then the method missing
are compares against aid Reg x of so we have a top up there the excellent for 2 different kinds of things are the B predic right that right x looks for B or B or be an island has right experts for have but I just switches around the the have Reg experts you say something like expect something to have key 0 rather than then the 1st to the has he method of so the your test sounds grammatical and not like a lot happening from the bead the B ones we're looking at here those so be valid matches that be predicates but it creates actually goes to a matter this object built in be predicate are which takes in the method name and the arguments and the blogs and in the fullness of time i comes
to a so code inside that matter Our check to see whether the predicate is accessible and whether it matches so it has some code I didn't show that converts to be valid to valid question mark method armored checks to see whether that method actually exists and whether it will of a sign looks for it in either it looks to see whether that method exists and then if the method exists it uses of a double underscore sand to dynamically invoke it and return true or false OK whether that determine whether the matter passes based on the predicate is true or false on the user's double underscore stand here because there is much much less likely to have been overridden by the actual object resistive least theoretically possible the object wettable written out bridges good so the mode trick I can be brief interlude for the mode Utrecht at the modi trick takes advantage of these define example group
methods and define example method showed for this is also from our this is from the internals of example group is just all the different fine example group method is the method that I respect users to say what an example groups to do it's created on these are all the ways that you can by default great example Rupert I that you probably familiar with describing context you probably never used example group so you may have used x describing EQS context which automatically pass along metadata to say that that that example group gets kept or F describing left context it automatically pass metadata that is to say that that example group has focused aren't you do something similar with methods
which you can you specify it and for some reason it fell off the slide from but specify example after it exits all which I pass along metadata so what I did then
is I just reopened example group of 4 medical stranger a real good example group and defined in Example grew method an example method in terms of emoji I wanted on inside that is I use the symbol or alias matter method to use the heart emoji and then they just sort of brute force over Rd are there's no easy way to get at is an alias for expects that a kind of brute force of faucet to use does what this is essentially a copy of what expect us I and II suppose confuse us straight a regular rebellious of and
then with that than this this can works so if you want to define your
own I am OGI and really you earn the love respected her coworkers by doing so our it's that simple the this 1 is the you wanna talk
about before a before laughter which is I wanna talk a little bit about how our specs MockPackage works of
Marx again now Ryan is going to do our speck in the next talk with Marx as a test wills of so here's a minimal block
example but we have a user we say that we expect the user to receive a method called credit rating and return a thousand and then we call something else that has own expectation but we've also set up by saying you expect the user received were setting up an expectation that that user i will receive that method in this this this test will fail the method is not get invoked so all to think for a 2nd just abstractly like what has to happen in that line of code that to receive all the book keeping that has to happen for our respect for my package to work a couple of things have happened but I respect needs to ensure that the
underlying method is not called in that instead of the value the use specified is returned ask but also as to track how often that method gets called and with what arguments because that's used to determine whether the mock passes or fails by the end of the test has 2 terminals expectations are met it the in order to see how that's done we need to talk about a 2 things 1st is the way that really
method lookup works but you may or may not be familiar with this Ruby method look up 1st looks in the thing called the singleton class of the instance that it goes through inference methods of that of that class on included modules apparent methods in Paris included models and so on the part I'm interested most interesting here is a singleton class because that's the 1st place that really looks at the place that usually not used of the singleton class you may have
seen 1 or 2 of the sin taxes are every object in Ruby has this weird little thing called a singleton class that basically exists to define methods on our you can use that class of Sobel operator syntax to get at it you can use you define something with an actual instance dot our method name and in both cases what happens is you create a method that only exist for that instance and no other object in your object space which is perfect for watermark wants to do or mask wants to be a method that exists for that 1 particular object and no other objects in your object so what I respect needs to do you effectively these are the concepts here this is a
local kind of a bad diagram we have the original object and its singleton class in our specs sets up this this structure but where I respect has this concept of a proxy of an a method double and space and the method double S. actually gets pushed into the singleton class of the original object to be the 1st place the review will look for the method to get called in to return the value the you specified rather than the actual method the proxy hold on to the information like how often the method has been called what arguments and that kind of thing and then the space is the list of all the proxies that are defined so if you define 2 if you define 2 separate a box marked methods on the same object but this space ask that we use this space concepts to ensure that they both those both of those stubs get attached to the same proxy so let's look at the look a little bit of code of because what what happens here is
as I expected call calling this as an argument to our received actually is a built that creates a matches just like EQ you did and that matter is
defined that matter just like each you is a very thin wrapper around an actual larger object in this case it's called matches are received and that takes in the method name being being stalled in the end unargued an optional block is most things in group in our strategic blocks but in this case we don't work that well
of inside the receive matcher there's us some bookkeeping the goes on but basically what happens is the RIR spec sets it up so that it creates a proxy and calls this causes this methods expectation method to be called on it on odds that looks at its existing proxy space to determine if there's a proxy for it to get the proxy were the method being step for the object being stub and then it creates this method substitute which
but eventually again there's a couple of layers in direction here but eventually that add method message expectation gets called it creates this method double object so it adds expectation to it and then that method double objects hold on to the original method hold on a reference to it and then it uses class exact in this case the definition target is the object being stub class exact gives you the singleton class of that object and basically defining a method to go into that singleton class that method has the name of the method being spelled in the body of it is the method double basically we are doing whatever you specify whether you specified a return value or a blocker of couple various working in ways that our spec works of that's bad that's method gets pushed into the singleton class the for that object in only for that object the step method is captures that method call and returns both both that returns the behavior of these specified and also tells the proxy that the method has been received with the arguments because then the proxy of to keep track of that and then at the end of the test are spec has and after book which is specifically for the mock objects for the MockPackage to clean up after itself and what it does is it what the space it goes to that space object and says are there any other any proxies freeze proxy it says do you have any methods doubles freeze methods double it says do you have any expectations for each 1 of those it says was that fulfilled or not given how many times this was called on and then after that happens after the test runs after all tear downs are that goes through invalidates all of this in terms of the test passes or fails so that a lot of stuff I know this is a lot of flying a very quickly a kind of scratches the surface there are a lot of cool things aspect does that we would I couldn't cover because I'm already pushing time and this is already like a freight train of code coming at you and I hope that you found this valuable but if you want more information
on respect that are spectacular tasted our spec info which is not the relish documentation that comes up the cucumbers this is the straight documentation of and is actually pretty decent of the codebase is actually not all that hard to read it and once you get used to how a kind of indirect stuff and or you can find your local lost the core remember I happen to work with 1 eye and pasta them to tell you how things work so if you don't have to work as a core member of the find 1 online test them and in the meantime I I know all rapine
again I work at the XII we define me on Twitter at all wrapped up I occasionally write books I have a couple that you might be interested in I book and testing rails stuff rest test prescriptions but actually not so much about rails as it is about testing in general of through rails of that's available prod product come for a limited time only and I have no idea how limited because they didn't tell me the code tests to rapine should give a 25 per cent of both the book in the physical book if you buy pragmatic also I do some self-publishing our JavaScript book and uh which you can get in all rapid that come the local trust driven development which is about projects and estimation and how to make your clients like you know or how to behave worthy of your clients like you both of those available more rapid that come both of those will be having updates and price ranges price raises in the relatively near future so if you want them they will never be available for cheaper than they available right now on the thank you for the time I hope the phone's valuable thing to spend a lot of the time with we hope you enjoy the rest of the conference and I hope you recover from my fast talk free trade of goods for last 40 minutes that you have a movement in in in in the
Ganze Funktion
Parametersystem
Shape <Informatik>
Bildschirmmaske
Menge
Rechter Winkel
Dezimalsystem
Softwarewerkzeug
Gerade Zahl
Schlussregel
Komplex <Algebra>
Softwaretest
Mereologie
Speicherabzug
Domänenspezifische Programmiersprache
Softwareentwickler
Komplex <Algebra>
Softwaretest
Subtraktion
Versionsverwaltung
Kontextbezogenes System
Term
Natürliche Sprache
Komplex <Algebra>
Code
Framework <Informatik>
Task
Virtuelle Maschine
Arithmetischer Ausdruck
Programmbibliothek
Speicherabzug
Programmbibliothek
Faserbündel
Brennen <Datenverarbeitung>
Punkt
Konfigurationsraum
Tablet PC
Konfigurationsraum
Tabelle <Informatik>
Sensitivitätsanalyse
Ortsoperator
Green-Funktion
EDV-Beratung
Strömungsrichtung
Quellcode
Computeranimation
Zusammengesetzte Verteilung
Open Source
Gewicht <Mathematik>
Rechter Winkel
Prozess <Informatik>
Dezimalsystem
Tabelle <Informatik>
Softwaretest
Videospiel
Bit
Gamecontroller
Domänenspezifische Programmiersprache
Task
Subtraktion
Bit
Selbstrepräsentation
Normalvektor
Domänenspezifische Programmiersprache
Computeranimation
Mapping <Computergraphik>
Objekt <Kategorie>
Parametersystem
Punkt
Selbstrepräsentation
Schlüsselverwaltung
Term
Gerade
Computeranimation
Objekt <Kategorie>
Mapping <Computergraphik>
Bit
Erwartungswert
Matching <Graphentheorie>
Klasse <Mathematik>
Gruppenkeim
Programmbibliothek
Term
Computeranimation
Integral
Metadaten
Gruppenoperation
Klasse <Mathematik>
Gruppenkeim
Keller <Informatik>
Punktspektrum
Term
Kontextbezogenes System
Code
Computeranimation
Eins
Übergang
Deskriptive Statistik
Metadaten
Erwartungswert
Vererbungshierarchie
Data Encryption Standard
Parametersystem
Vererbungshierarchie
Ausnahmebehandlung
p-Block
Kontextbezogenes System
Quick-Sort
Objekt <Kategorie>
Gruppenkeim
Menge
Last
Server
p-Block
Schlüsselverwaltung
Brennen <Datenverarbeitung>
Zeichenkette
Instantiierung
Klasse <Mathematik>
Gruppenkeim
Implementierung
Term
Code
Computeranimation
Übergang
Informationsmodellierung
Knotenmenge
Datensatz
Vererbungshierarchie
Affiner Raum
Inhalt <Mathematik>
Lineares Funktional
Parametersystem
Vererbungshierarchie
Konfigurationsraum
Systemaufruf
p-Block
Computervirus
Objektklasse
Kontextbezogenes System
Domänenspezifische Programmiersprache
Modul
Quick-Sort
Objekt <Kategorie>
Gruppenkeim
Mereologie
Instantiierung
Aliasing
Subtraktion
Klasse <Mathematik>
Gruppenoperation
Versionsverwaltung
Gruppenkeim
Zahlenbereich
p-Block
Instantiierung
Kontextbezogenes System
Term
Computeranimation
Objekt <Kategorie>
Deskriptive Statistik
Metadaten
Informationsmodellierung
Vererbungshierarchie
Attributierte Grammatik
p-Block
Parametersystem
Konfiguration <Informatik>
Punkt
Kategorie <Mathematik>
Klasse <Mathematik>
Gruppenkeim
p-Block
Instantiierung
Quick-Sort
Code
Computeranimation
Konfiguration <Informatik>
Deskriptive Statistik
Metadaten
Gruppenkeim
Mereologie
Ablöseblase
Mini-Disc
p-Block
Instantiierung
Resultante
ATM
Gruppenkeim
Gruppenoperation
Endogene Variable
Gruppenkeim
Dateiformat
Inverser Limes
Ausnahmebehandlung
p-Block
Vektorraum
Kontextbezogenes System
Ganze Funktion
Verkehrsinformation
Gerade
Message-Passing
Computeranimation
Softwaretest
ATM
Wasserdampftafel
Gruppenkeim
Ausnahmebehandlung
Mailing-Liste
p-Block
Instantiierung
Biprodukt
Code
Computeranimation
Rechenschieber
Netzwerktopologie
Mapping <Computergraphik>
Druckverlauf
Skeleton <Programmierung>
Einheit <Mathematik>
Mereologie
Gamecontroller
Strategisches Spiel
Gerade
Instantiierung
Softwaretest
Objekt <Kategorie>
Parametersystem
Erwartungswert
Endogene Variable
Code
Gerade
Computeranimation
Objekt <Kategorie>
Matching <Graphentheorie>
Erwartungswert
Parametersystem
Endogene Variable
Graphiktablett
Leistungsbewertung
Resultante
Parametersystem
Schnelltaste
Punkt
Matching <Graphentheorie>
Gruppenkeim
Ausnahmebehandlung
Tablet PC
Datenfluss
Computeranimation
Objekt <Kategorie>
Informationsmodellierung
Erwartungswert
Wrapper <Programmierung>
Verkehrsinformation
Zeichenkette
Objekt <Kategorie>
Prädikat <Logik>
Prädikat <Logik>
Informationsmodellierung
Validität
Regulärer Ausdruck
p-Block
Code
Computeranimation
Softwaretest
Parametersystem
Expertensystem
Prädikat <Logik>
Subtraktion
Matching <Graphentheorie>
Regulärer Ausdruck
Benutzerfreundlichkeit
Computeranimation
Eins
Objekt <Kategorie>
Regulärer Ausdruck
Prädikat <Logik>
Rechter Winkel
p-Block
ATM
Subtraktion
Güte der Anpassung
Gruppenkeim
Validität
Ähnlichkeitsgeometrie
Tablet PC
Kontextbezogenes System
Kontextbezogenes System
Code
Computeranimation
Objekt <Kategorie>
Metadaten
Prädikat <Logik>
Vorzeichen <Mathematik>
Fokalpunkt
p-Block
Default
Rechenschieber
Aliasing
Prinzip der gleichmäßigen Beschränktheit
System F
Forcing
Reelle Zahl
Fokalpunkt
Güte der Anpassung
Gruppenkeim
Symboltabelle
Term
Quick-Sort
Computeranimation
Softwaretest
Bit
p-Block
p-Block
Tablet PC
Computeranimation
Softwaretest
Parametersystem
Erwartungswert
Weg <Topologie>
Abelsche Kategorie
Radikal <Mathematik>
Tablet PC
Ordnung <Mathematik>
Bitrate
Message-Passing
Gerade
Code
Computeranimation
Sinusfunktion
Nichtlinearer Operator
Inferenz <Künstliche Intelligenz>
Vererbungshierarchie
Klasse <Mathematik>
Objektklasse
Instantiierung
Modul
Raum-Zeit
Computeranimation
Verdeckungsrechnung
Objekt <Kategorie>
Informationsmodellierung
Modul <Datentyp>
Mereologie
Elektronisches Wasserzeichen
Instantiierung
Proxy Server
Parametersystem
Bit
Quader
Raum-Zeit
Klasse <Mathematik>
Abelsche Kategorie
Mailing-Liste
Raum-Zeit
Code
Computeranimation
Objekt <Kategorie>
Diagramm
Proxy Server
Delisches Problem
Information
Datenstruktur
Proxy Server
Matching <Graphentheorie>
Raum-Zeit
Gruppenkeim
p-Block
Raum-Zeit
Computeranimation
Objekt <Kategorie>
Erwartungswert
Proxy Server
Wrapper <Programmierung>
Substitution
p-Block
Brennen <Datenverarbeitung>
Proxy Server
Wellenpaket
Klasse <Mathematik>
Gefrieren
Term
Raum-Zeit
Code
Computeranimation
Überlagerung <Mathematik>
Richtung
Weg <Topologie>
Erwartungswert
Dämpfung
Flächentheorie
Proxy Server
Delisches Problem
Softwaretest
Parametersystem
Systemaufruf
Motion Capturing
Objekt <Kategorie>
Speicherabzug
Information
p-Block
Message-Passing
Tabelle <Informatik>
Softwaretest
Schätzwert
Freeware
Güte der Anpassung
Biprodukt
Code
Spannweite <Stochastik>
Client
Softwaretest
Twitter <Softwareplattform>
Rechter Winkel
Vorlesung/Konferenz
Projektive Ebene
Softwareentwickler

Metadaten

Formale Metadaten

Titel RSpec: It's Not Actually Magic
Serientitel RailsConf 2015
Teil 58
Anzahl der Teile 94
Autor Rappin, Noel
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/30698
Herausgeber Confreaks, LLC
Erscheinungsjahr 2015
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract RSpec is often described with the word “magic” by both its users and its detractors. Understanding how RSpec matchers, doubles, and specifications work will help you as an RSpec user. You will be able to take advantage of RSpec’s flexibility to make your tests clearer and more expressive. You’ll also get some exposure to new RSpec features, like compound matchers. Walking through a typical RSpec example, we’ll show the RSpec internals as RSpec evaluates matchers and uses doubles. You’ll leave with a better understanding of how to harness RSpec in your own tests.

Ähnliche Filme

Loading...