Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 30 17:02
    ahoward commented #97
  • Jun 30 17:01
    ahoward commented #97
  • Jun 30 16:58
  • Jun 30 09:01
    flash-gordon commented #97
  • Jun 30 03:07
    ahoward labeled #97
  • Jun 30 03:07
    ahoward opened #97
  • Jun 30 03:07
    ahoward labeled #97
  • Jun 28 13:44
  • Jun 28 10:17
    kroolp commented #83
  • Jun 28 07:49
    solnic commented #83
  • Jun 28 07:47
    solnic commented #84
  • Jun 27 16:07
    kroolp review_requested #84
  • Jun 27 16:07
    kroolp opened #84
  • Jun 27 16:05
    kroolp labeled #83
  • Jun 27 16:05
    kroolp labeled #83
  • Jun 27 16:05
    kroolp opened #83
  • Jun 27 15:26
  • Jun 27 07:35

    solnic on release-1.3

    Update unit.html.md Corrected … Merge pull request #164 from bl… (compare)

  • Jun 27 07:35
    solnic closed #164
  • Jun 26 14:07
    blauentag opened #164
Piotr Solnica
@solnic
like rom repos etc
Andy Holland
@AMHOL
Yeah, makes sense, I didn't think about that when I made the register('blah', Blah.new) interface, I think I might remove that
Piotr Solnica
@solnic
it shouldn’t be too hard to do on the container side and it would simplify things
Andy Holland
@AMHOL
Could probably simplify things if I remove that and the proc interface and only allow block registration with options
Piotr Solnica
@solnic
yes
Piotr Solnica
@solnic
@AMHOL it would also allow us to require files within the block
and it would be called just once
I basically want a way of having complete isolation wrt deps
Andy Holland
@AMHOL
Yeah, although that feels a bit wrong, dunno why lol
Piotr Solnica
@solnic
so ie I want to write a test, require only the container, and when I ask for a specific dep I know only min will be required and instantiated
I dunno, I had the same feeling initially, but now if kinda feels right
needs further thinking I suppose
Andy Holland
@AMHOL
Yeah, makes sense I guess
I just think it's better to require everything eagerly during setup
Piotr Solnica
@solnic
worth to experiment with this
when booting, YES OF COURSE
when loading a test, NO OF COURSE NOT
ie rspec spec/unit/foo_spec.rb should run in complete isolation
wrt deps
atm I require spec-helper which loads the app, this is nonsense
when I see “123421.214412341 seconds to load files” in the rspec output, I cry
Andy Holland
@AMHOL
lmao
Fair point
If you load in isolation, how do you know the method under test hasn't been monkey wrenched though?
Piotr Solnica
@solnic
wdym?
Andy Holland
@AMHOL
Forgot the :trollface:
lol
Monkey patched
Piotr Solnica
@solnic
sorry, didn’t get the joke, FUNNY :D
or scary, not sure
Andy Holland
@AMHOL
Yeah
It's funny because it's true
Piotr Solnica
@solnic
right :)
I can now see what changes are needed to achieve isolation
I need to separate container configuration from finalization
it was collapsed into one thing, it is a mistake
Andy Holland
@AMHOL
Makes sense, better to be explicit too
Piotr Solnica
@solnic
then, I need to make a smarter import function, that would require missing deps
which should be trivial
pretty much looping through names, asking container if it exists, if not, gsubbing dots with slashes, asking container to require missing stuff
I want to require the container in the spec helper and it should have the config in place, bkz config is a dependency too for stuff like db url etc
then the import stuff should be able to take care of everything
ultimate goal is to be able to run tests in complete isolation
so you don’t load tons of files w/o any good reason
I will call this feature “Summer"
becauase summer comes after spring
Andy Holland
@AMHOL
:joy:
Andy Holland
@AMHOL
Piotr Solnica
@solnic
sweet
can we have include Dry::Constructor(:foo, :bar, kwargs: true) too? :D