3

I'm getting in to testing javascript in rails 4, but it seems there are two options. The jasminerice gem, which looks like it's been round for a while but maybe not so up to date and the jasmine-rails gem which looks like it's being released more often. Should I use jasminerice or jasmine-rails?

Update From my searching round, it looks like teaspoon is the new popular kid on the block: https://github.com/modeset/teaspoon

rainkinz
  • 10,082
  • 5
  • 45
  • 73
  • I can't understand the downvote or the close flag. This is a similar question to: http://stackoverflow.com/questions/9710297/jasmine-vs-mocha-javascript-testing-for-rails-3-1?rq=1 which nobody seemed to object to. – rainkinz Nov 25 '13 at 19:33

1 Answers1

0

I am not quite sure if I understand what you are looking for, but we used Jasmine and PhantomJS to run our spec.

For that to work you need to add that to your jasmine_helper.rb

Jasmine.configure do |config|
  config.browser = :phantomjs
end

You can execute the spec via rake jasmine:ci

phoet
  • 18,688
  • 4
  • 46
  • 74
  • Thanks. I realize I could use that sort of approach. I *think* the difference between that and the gems I'm looking at is that they integrate with the asset pipeline in a more integrated way rather than just supplying the jasmine javascript wrapped in a gem. – rainkinz Nov 25 '13 at 19:34