RailsCasts Pro episodes are now free!

Learn more or hide this

Jeremy Jackson's Profile

GitHub User: jejacks0n

Comments by Jeremy Jackson

Avatar

Just wanted to contribute a bit of info, and mention the Teaspoon project.

I used Jasmine for a long time (in Rails and non-Rails projects), but when Rails 3.0 came out it didn't work well with it, so I switched to Evergreen since it had the features that I needed at the time and used that for well over 2 years, but it lacks nice support for the Rails 3.1 asset pipeline (and it doesn't seem to be maintained anymore?). I switched to JasmineRice fairly recently and used Cucumber to run the javascript suite on CI, but that wasn't great either.

Anyway, I'm not a fan of switching testing frameworks (honestly), and ended up writing a test runner that had all the features that I wanted -- along with several others.

It utilizes the asset pipeline, uses PhantomJS to run headless (or you can use Selenium Webdriver).. It comes with support for Jasmine, Mocha, and QUnit. You can run it via a rake task, or in the browser -- and since it's running via the Rails server itself it can be used in a more integration sort of way -- testing json api's etc.

Anyway, that's my experience, and my attempt at a solid solution. Hopefully the project will help others.

https://github.com/modeset/teaspoon

Avatar

@GuilhermeSimoes I took a different approach to this same feature.

In devise/registrations/new.html.erb:

ruby
link_to "Cancel registration using #{session['devise.omniauth'][:provider].titleize}", cancel_registration_path(resource)

(only if the 'devise.omniauth' session var is set)

I also switched to using 'devise.omniauth' because the devise documents say it cleans anything in the session that starts with 'devise' on successful authentication.

Great cast as always. =) Thanks Ryan.

Avatar

Thanks for the kind words.. And yeah, that's the basic idea, but it becomes pretty heavy on the server side and I've intentionally kept that to a minimum (see complaint about formtastic and paperclip above).

You can just adjust the configuration to point to a different route/path when loading the history panel, so it's as simple as writing a view that you want to see. =)

Avatar

So, yeah.. it does have these dependencies, but I will likely drop formtastic -- as it was only used as a convenience for the example snippet options form. I've been meaning to for a while now.

Avatar

I'm actively maintaining the project, and I'm interested in what you mean here.

It may be easier and not get lost if you submit ideas on the github project https://github.com/jejacks0n/mercury -- with some more details.

Avatar

Thanks for the putting this screencast together! So awesome! And as always, useful -- even if it is my own project.

I've taken notes on some things that could be made nicer or simplified, so it's been invaluable for me. And I'll be pushing updates that address some of the things that could be improved on in the next few weeks.. I've also update the documentation to include a link to this railscast.