Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

add linux support to ``rake spec:browser`` #168

Merged
merged 1 commit into from

2 participants

@thedeeno

Tested on ubuntu 10.10. Doesn't change how it works under osx.

@infews infews merged commit 8a298e5 into jasmine:master
@infews
Owner

Thanks for this!

@thedeeno

You're welcome! Side note, I'm implementing cucumber inspired 'tags' for jasmine specs. Just to be sure I'm not on the wrong path, do you know what the intent of jasmine.Env.specFilter is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 3, 2012
  1. @thedeeno
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 2 deletions.
  1. +9 −2 tasks/spec.rb
View
11 tasks/spec.rb
@@ -9,10 +9,17 @@
system("node spec/node_suite.js #{color}")
end
-desc "Run specs in the default browser (MacOS only)"
+desc "Run specs in the default browser (MacOS, Linux)"
task "spec:browser" => [:count_specs, :build_runner_html] do
puts "Running all appropriate specs via the default web browser".cyan
- system("open spec/runner.html")
+
+ require 'rbconfig'
+ case Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG['host_os']
+ when /linux/
+ system("xdg-open spec/runner.html")
+ else
+ system("open spec/runner.html")
+ end
end
#Count number of specs in Jasmine core
Something went wrong with that request. Please try again.