Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing #11

Closed
jgaskins opened this issue Apr 5, 2015 · 10 comments
Closed

Testing #11

jgaskins opened this issue Apr 5, 2015 · 10 comments
Labels

Comments

@jgaskins
Copy link
Member

jgaskins commented Apr 5, 2015

You might have noticed there aren't any tests in the Clearwater repo. I have tests (using opal-rspec), but they're in a repo on my computer inside the app from which I extracted it. The app is something that likely won't be open-source (it's a project for my wife), and I don't think we want to add an entire Rails app just to add tests anyway.

Since Clearwater is no longer just a personal project for me and other people will probably want to run the tests, I'd like to extract them into something else, but I haven't played with Opal outside of Rails yet. Ideally, I'd prefer to run them on the command line. Does anyone know how we might do that?

@krainboltgreene
Copy link

I'm big on running tests in MRI ruby, using DI to mock around implementation specific things.

@jgaskins
Copy link
Member Author

Not a bad idea. I'll have a look to see how well that works for these specs.

I think there's benefit to actually running the specs inside Opal, though. Maybe we could do that for CI, and keep MRI to individual testing.

@jdickey
Copy link

jdickey commented Apr 21, 2015

Please give a thought to MiniTest as well as RSpec; we and a couple of other shops I know are in the middle of an RSpec-to-MiniTest::Spec evolution. I'm about to start kicking the tires on Clearwater for a POC. It would be ironic if one of the tools that enabled our Ruby fans to go toe-to-toe with Node evangelists turned out to require us to use two different test frameworks for "a single language".

@krainboltgreene
Copy link

Not a huge fan of MiniTest.

On Tue, Apr 21, 2015 at 12:09 AM Jeff Dickey notifications@github.com
wrote:

Please give a thought to MiniTest as well as RSpec; we and a couple of
other shops I know are in the middle of an RSpec-to-MiniTest::Spec
evolution. I'm about to start kicking the tires on Clearwater for a POC. It
would be ironic if one of the tools that enabled our Ruby fans to go
toe-to-toe with Node evangelists turned out to require us to use two
different test frameworks for "a single language".


Reply to this email directly or view it on GitHub
#11 (comment)
.

@jgaskins
Copy link
Member Author

@jdickey I meant for testing the framework itself. If you want to use Minitest for your app, you should still be able to do that.

@jdickey
Copy link

jdickey commented Apr 23, 2015

@jgaskins Right; thanks. Sorry for the confusion.

@krainboltgreene
Copy link

To be fair, whenever you're writing a framework (web, testing, or
otherwise) it's really hard to nail down the meta nature of what's being
discussed. Does "user" mean people developing clearwater, people developing
with clearwater, or people interacting with clearwater? ;)

On Thu, Apr 23, 2015 at 3:26 AM Jeff Dickey notifications@github.com
wrote:

@jgaskins https://github.com/jgaskins Right; thanks. Sorry for the
confusion.


Reply to this email directly or view it on GitHub
#11 (comment)
.

@jdickey
Copy link

jdickey commented Apr 23, 2015

And the answer to that question is, obviously, "yes". 😜

Thanks and carry on. :)

@wied03
Copy link

wied03 commented Sep 16, 2015

@jgaskins - Lots of working going on w/ opal-rspec to get it up to snuff. I use 0.5.0 beta 2 to test my React components right now

@jgaskins
Copy link
Member Author

@wied03 It took me a while to get it figured out (I had some stale config that was kind of frustrating to discover), but I got specs running and passing. Thanks!

I've imported most of the Clearwater-specific specs from the original project I extracted Clearwater from. Some were outdated, so they've been removed. Also, some of the specs were straight-up missing and I don't know where they went.

I think the coverage is probably pretty good as it is, though. One of the spec files actually renders to DOM element created in memory, so that covers most of it anyway.

All that said, I'm gonna go ahead and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants