Code Monkey home page Code Monkey logo

Comments (4)

JunichiIto avatar JunichiIto commented on June 30, 2024 1

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.

ruralocity avatar ruralocity commented on June 30, 2024 1

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.

ristovskiv avatar ristovskiv commented on June 30, 2024

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.

andyw8 avatar andyw8 commented on June 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.