fedwiki / wiki-plugin-video

Embed Video from YouTube or Vimeo
Other
2 stars 5 forks source link

Add tests #16

Closed san650 closed 8 years ago

san650 commented 8 years ago

Fixes #13

WardCunningham commented 8 years ago

Thank you for this contribution.

WardCunningham commented 8 years ago

As I look at this more I think that a better approach would be to test parse and embed separately. The emit just concatenates the results with some additional (reliable) escaping that need not be tested. The intermediate result between these two methods is easy to test for parse and easy to construct for embed. This saves having to worry about mocking $item or wiki.

san650 commented 8 years ago

Ok, sounds reasonable. I'll change the tests to test each method separately.

WardCunningham commented 8 years ago

Thank you for your patience.

san650 commented 8 years ago

@WardCunningham I've updated the PR

WardCunningham commented 8 years ago

Many thanks.