Skip to content

Instantly share code, notes, and snippets.

@gnarargs
Created February 25, 2012 17:44
Show Gist options
  • Save gnarargs/1909717 to your computer and use it in GitHub Desktop.
Save gnarargs/1909717 to your computer and use it in GitHub Desktop.
override jasmine's location of jasmine.yml config file
begin
require 'jasmine'
class Jasmine::Config
def simple_config_file
File.join(project_root, 'spec/support/jasmine.yml')
# instead of 'spec/javascripts/support/jasmine.yml'
end
end
load 'jasmine/tasks/jasmine.rake'
rescue LoadError
task :jasmine do
abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
end
end
@mmacedo
Copy link

mmacedo commented Jun 28, 2015

It did not work on 2.3.4, but this one did:

begin
  require 'jasmine'
  ENV['JASMINE_CONFIG_PATH'] = 'spec/support/jasmine.yml'
  load 'jasmine/tasks/jasmine.rake'
rescue LoadError
  task :jasmine do
    abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment