Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add additional spec to test string-only guard group names

  • Loading branch information...
commit b0d30900fbc0ab7c0236cff6d4f53df298e55200 1 parent 087f510
John Bintz authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 spec/guard/dsl_spec.rb
14 spec/guard/dsl_spec.rb
View
@@ -186,7 +186,11 @@
end
describe "#group" do
- it "should evaluates only the specified group" do
+ it "should evaluates only the specified string group" do
+ ::Guard.should_receive(:add_guard).with('test', anything, {})
+ lambda { subject.evaluate_guardfile(:guardfile_contents => valid_guardfile_string, :group => ['w']) }.should_not raise_error
+ end
+ it "should evaluates only the specified symbol group" do
::Guard.should_receive(:add_guard).with('test', anything, {})
lambda { subject.evaluate_guardfile(:guardfile_contents => valid_guardfile_string, :group => ['x']) }.should_not raise_error
end
@@ -251,7 +255,13 @@ def fake_guardfile(name, contents)
end
def valid_guardfile_string
- "group :x do
+ "group 'w' do
+ guard 'test' do
+ watch('c')
+ end
+ end
+
+ group :x do
guard 'test' do
watch('c')
end
Please sign in to comment.
Something went wrong with that request. Please try again.