Skip to content

Question: Should we change our stubs policy? #112

Open
@joshgoebel

Description

Pulling this out incase it requires further discussion. Didn't want it to get lost.


The first example (just new) only works [well] in this case because ALL tests start with a call to the new method... if there were other static methods and those did not exist... then they would need to exist or you get a hard error.

The second example - the hard error (Wren Console can't compile the script or test suite)... I don't think is super welcoming for students. Would/should it be reasonable for harder exercises? I dunno... I was trying VERY hard not to have any "boiler plate comments" which students never remove and drive me nuts.

Or maybe my first assertion above is wrong - if we went with something like this:

class HighScores {
}

You get a soft runtime error of:

HighScores metaclass does not implement 'new(_)'.
at test(_,_) block argument (./high-scores.spec.wren line 7)

I think static methods may be resolved at compile-time though?

Originally posted by @joshgoebel in #111 (comment)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions