Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Cyril Kato
@cyril
This message was deleted
So what did you fix last night?
citron1
@citron1
Hello, I heard that Spectus is using fork() to test each expectation in order to prevent from side effects. And so my question is: what about the performances?
citron1
@citron1
I mean, for comparaison RSpec which is do not preventing from side effects don't use this UNIX function... and that's a positive point for speeding up test suites.
Cyril Kato
@cyril
@citron1 Hello, and welcome there! Yup I agree, this fork() is quite costly. However it is not enable by default! :x:
Cyril Kato
@cyril
So if for instance you want to express an absolute requirement without any isolation, then you can call the MUST method (without ! at the end).
Otherwise, the MUST! method is also available, to perform the test inside a sub-process, preventing any side effects. :smile:
citron1
@citron1
Gotcha. Thanks man!
Cyril Kato
@cyril
:thumbsup:
Cyril Kato
@cyril
@/all FYI, a small Rspec clone based on Fix specing framework is also available at https://github.com/cyril/r_spec; happy testing!
Shideneyu
@shideneyu
:D
ceulain
@ceulain
Dear Cyril, i just discover Fix, it's a amazing tool for Ruby. I love it !!! I used it every day now. It changes my life