
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This gem adds the Jasmine runner into a middleman app under the /jasmine
path.
It has (optional) support for Sprockets.
It uses Jasmine 2.0. For Jasmine 1.3 support use the jasmine_1_3 branch.
Add this line to your application's Gemfile:
gem 'middleman-jasmine'
And then execute:
$ bundle
First run bundle exec jasmine init
to setup Jasmine.
Then, if you have Sprockets installed through middleman-sprockets, you can create a spec.js
file in spec/javascripts/
to include all your specs, i.e.
//= require application
//= require_tree .
Add the following code to your config.rb
file:
activate :jasmine
Write a spec file under spec/javascripts/
and hit /jasmine
under your Middleman app, e.g. http://localhost:4567/jasmine
.
You should see the results of the spec pass/fail under Jasmine.
You can also run the Jasmine-tests using PhantomJS with Rake:
Add the following to the Rakefile
generated from bundle exec jasmine init
:
require 'middleman'
require 'middleman-jasmine'
require 'middleman/jasmine/tasks'
Then use:
rake middleman_jasmine:ci
To configure the extension, use:
activate :jasmine do |options|
options.fixtures_dir = "spec/javascripts/fixtures"
options.jasmine_url = "/jasmine"
options.config_file = "spec/config.yml"
options.debug_assets = false
end
NOTE: debug_assets
can be used to extract any assets included in the spec files and serve them with ?body=t
to avoid Sprockets compiling them every time a spec re-runs.
If you add additional paths to Sprockets with append_path
in your after_configuration
block then you'll most likely need to append the same paths to the Middleman::Jasmine
Sprockets instance. To do that use the helper jasmine_sprockets
, i.e.:
after_configuration do
handlebars_path = File.expand_path('../', ::Handlebars::Source.bundled_path)
sprockets.append_path(handlebars_path)
# add Handlebars to Jasmine too
jasmine_sprockets.append_path(handlebars_path)
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that middleman-jasmine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.