Comments (4)
I sometimes use FactoryGirl callbacks, but I think traits are more useful and important than callbacks, so please include them in the next version.
Or do you think the section is unnecessary?
I think callbacks are important technique too, so they should remain in the book.
from rails-5.0-rspec-3.5.
Thanks @ristovskiv @andyw8 @JunichiIto. I'm going to keep callbacks in the book, with stress that they can cause the problems that Andy mentioned. Junichi, yes, I am including traits.
from rails-5.0-rspec-3.5.
I think people should be introduced to as much as possible capabilities of Factory Girl (though they have a clear documentation). I don't really know if it will be advertising or not, but you can point to the link for a nice 24 min course . Now I don't know for how long this link will be valid (as with most links), but since it's coming for Upcase
which is Thoughtbot's
I think it will last.
from rails-5.0-rspec-3.5.
I try to avoid using FactoryGirl callbacks, since they can cascade and cause a large number of queries to be run, slowing down the test suite. I'd rather make the setup explicit as part of test.
from rails-5.0-rspec-3.5.
Related Issues (2)
- Do you use Faker? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-5.0-rspec-3.5.