These are chat archives for opal/opal

23rd
May 2016
Elia Schito
@elia
May 23 2016 08:54
@Thermatix try using original minitest instructions, but replace ruby with opal in CLI examples
Forrest Chang
@fkchang
May 23 2016 21:40
@/all anyone stub/mock out document ? I suspect if anyone @wied03 has -- anyways want to write a unit test and want to pass in a double for document rather than manipulate the DOM directly, if possible
Jamie Gaskins
@jgaskins
May 23 2016 23:15
@fkchang I stub native JS objects all the time. Usually, something like this is all you need:
foo_called = false
stubbed = `{ foo: function() { foo_called = true } }`
do_thing(stubbed)

expect(foo_called).to be_truthy