Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vlad Faust
    @vladfaust
    Yeah. So please paste your program and error
    Gian D
    @fusillicode_twitter
    Let's hope that this lobby will grow
    let me paste it
    Vlad Faust
    @vladfaust
    Let's hope not :D
    Gian D
    @fusillicode_twitter
    lol
    btw there's no error
    just failing specs
    Vlad Faust
    @vladfaust
    Specs fail with errors
    Give me context, give me specs
    Gian D
    @fusillicode_twitter
    well yeah that's a kind of error sure, I was thinking about compilation errors 😅
    sure
    let me get them
    this is the output
    I've put a pp inside the blank rule to see the actual processed properties
    and it seems that I only get the property for which I have a validate call inside the struct under test
    Vlad Faust
    @vladfaust
    You could put pp into the validations code itself (the lib's) for debug purposes
    Gian D
    @fusillicode_twitter
    you're right
    Vlad Faust
    @vladfaust
    The issue is too broad for me now, please try to narrow it
    Gian D
    @fusillicode_twitter
    sure sure I totally understand ;)
    Vlad Faust
    @vladfaust
    Thank you
    Gian D
    @fusillicode_twitter
    ok I've found a solution
    but only by playing around blindly so beware I've still some missing knowledge to fill

    anyway with

    def validate
        previous_def
    end

    inside the shared validations module and

    def validate
        super
    end

    inside the structs that mixes the module it seems that everything works fine

    Vlad Faust
    @vladfaust

    Hm.

    def validate
        super
    end

    Doesn't make sense. If it compiles, it means validate is already defined

    And if removing

    def validate
        super
    end

    , specs fail?

    Gian D
    @fusillicode_twitter
    yes :(
    Vlad Faust
    @vladfaust
    That's a damn magic
    BTW, you want these gigantic specs to be included into the lib?
    Gian D
    @fusillicode_twitter
    well maybe it would help to have some reference regarding this case but I think that I need to clean them up
    they're somehow specific to a problem :)