Permalink
Browse files

Add forceexit option

  • Loading branch information...
1 parent 4ae7f88 commit 3f7034918dd247ef51690e373bd2176b8bd9aac5 @textgoeshere textgoeshere committed Oct 1, 2012
Showing with 13 additions and 2 deletions.
  1. +4 −0 README.md
  2. +1 −0 lib/guard/jasmine_node.rb
  3. +3 −2 lib/guard/jasmine_node/runner.rb
  4. +5 −0 spec/lib/jasmine_node_spec.rb
View
@@ -59,6 +59,10 @@ Display growl/libnotify notifications.
Load coffeescript and all execution of .coffee files.
+* `:forceexit # default => false`
+
+Force jasmine-node process to quit after test (can help fix hanging specs)
+
* `:verbose # default => false`
Execute jasmine-node in verbose mode
@@ -11,6 +11,7 @@ class JasmineNode < Guard
:notify => true,
:coffeescript => true,
:verbose => false,
+ :forceexit => false,
:spec_paths => %w(spec)
}
@@ -32,8 +32,9 @@ def self.jasmine_node_command
def self.command_line_options
options = []
- options << "--coffee" if @options[:coffeescript]
- options << "--verbose" if @options[:verbose]
+ options << "--coffee" if @options[:coffeescript]
+ options << "--verbose" if @options[:verbose]
+ options << "--forceexit" if @options[:forceexit]
options.join(" ")
end
end
@@ -66,6 +66,7 @@
:notify => false,
:coffeescript => false,
:verbose => true,
+ :forceexit => true,
:spec_paths => some_comma_separated_paths
}) }
@@ -100,6 +101,10 @@
it "sets the :spec_paths options to an array of paths given by a comma-separated string" do
guard.options[:spec_paths].should =~ some_paths
end
+
+ it "sets the :forceexit option" do
+ guard.options[:forceexit].should be_true
+ end
end
end

0 comments on commit 3f70349

Please sign in to comment.