Giter Site home page Giter Site logo

Comments (4)

ragaskar avatar ragaskar commented on August 26, 2024

If you're using jasmine.yml you almost always will want to set this in jasmine.yml, as it reads this config right before starting up. If you're using HEAD you have the opportunity to override this (using jasmine_helper.rb) in a Jasmine.configure block, but otherwise jasmine.yml takes precedence

from jasmine-gem.

delphaber avatar delphaber commented on August 26, 2024

Thanks for the reply. I see... but maybe I'm missing something. I can override jasmine.yml options in spec/javascripts/support/jasmine_helper.rb . But I have not a spec/javascripts/support folder because my folder structure is different and I'd like to keep al my tests in a folder which is not "spec"

I hope I explained it well :)

from jasmine-gem.

ragaskar avatar ragaskar commented on August 26, 2024

Ah, I understand. That may be trickier, I think right now you'll have to override the Rakefile and the run_specs.rb file.

Jasmine.load_configuration_from_yaml takes an optional path, which you'll want to set in your Rakefile, eg.

task :server => "jasmine:require" do
   port = ENV['JASMINE_PORT'] || 8888
   puts "your tests are here:"
   puts "  http://localhost:#{port}/"
  Jasmine.load_configuration_from_yaml("FULL_PATH_TO_MY_NEW_YAML")
  app = Jasmine::Application.app(Jasmine.config)
  Jasmine::Server.new(port, app).start
end

You'll also need to override Jasmine.runner_filepath with a new filepath that returns a custom run_specs.rb where you have also called load_configuration_from_yaml with the full path to your yml.

I'm not sure of an easier way to do this. Maybe we could allow you to configure the yaml location in Jasmine.configure and then you could just override that in your Rakefile?

from jasmine-gem.

delphaber avatar delphaber commented on August 26, 2024

Hi, thank you very much. I'm gonna try your solution within some days!

from jasmine-gem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.