Any suggestions to make jasmine working with Rails asset pipeline?

127 views
Skip to first unread message

forbing

unread,
May 9, 2012, 1:58:37 AM5/9/12
to jasmi...@googlegroups.com
I am working on a rails 3 project, where I want to use Jasmine to write unit tests, But seems it's not working well with asset pipeline, such as JST, etc.

Anyone has some suggestions about this?

Thanks in advance!

Chris Nelson

unread,
May 9, 2012, 11:00:33 AM5/9/12
to jasmi...@googlegroups.com
Two different options that I know work are evergreen and jasminerice.

--Chris

--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jasmine-js/-/6gHNW6BGzx8J.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.

Aaron McLeod

unread,
May 9, 2012, 11:05:02 AM5/9/12
to jasmi...@googlegroups.com
Yeah i've found jasmine rice to be quite good.

On one project, i used the 1.2rc1 branch of jasmine, and setup my jasmine.yml file to use asset_pipeline_paths. https://gist.github.com/2645217

I have to admit I do not remember if there's other setup required, but my tests load and work fine when loaded via rake jasmine. I realize my gem file there has jasmine rice, but i'm not using it.


-- 
Aaron McLeod
http://agmprojects.com

Davis W. Frank

unread,
May 9, 2012, 5:34:55 PM5/9/12
to jasmi...@googlegroups.com
HEAD of master works quite well with the Asset Pipeline. With two known issues:

1) At the moment, we run tests against your concatenated files. We are looking at a couple of different ways to solve this - neither is optimal yet.
2) Since we're loading concat'ed assets when the server is loaded, you have to restart when templates change, due to how Sprockets builds them. This is a bit harder to fix...

--dwf


--
thx,
--dwf

Reply all
Reply to author
Forward
0 new messages