Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add additional spec to test string-only guard group names

  • Loading branch information...
commit b0d30900fbc0ab7c0236cff6d4f53df298e55200 1 parent 087f510
John Bintz authored

Showing 1 changed file with 12 additions and 2 deletions. Show diff stats Hide diff stats

  1. +12 2 spec/guard/dsl_spec.rb
14 spec/guard/dsl_spec.rb
@@ -186,7 +186,11 @@
186 186 end
187 187
188 188 describe "#group" do
189   - it "should evaluates only the specified group" do
  189 + it "should evaluates only the specified string group" do
  190 + ::Guard.should_receive(:add_guard).with('test', anything, {})
  191 + lambda { subject.evaluate_guardfile(:guardfile_contents => valid_guardfile_string, :group => ['w']) }.should_not raise_error
  192 + end
  193 + it "should evaluates only the specified symbol group" do
190 194 ::Guard.should_receive(:add_guard).with('test', anything, {})
191 195 lambda { subject.evaluate_guardfile(:guardfile_contents => valid_guardfile_string, :group => ['x']) }.should_not raise_error
192 196 end
@@ -251,7 +255,13 @@ def fake_guardfile(name, contents)
251 255 end
252 256
253 257 def valid_guardfile_string
254   - "group :x do
  258 + "group 'w' do
  259 + guard 'test' do
  260 + watch('c')
  261 + end
  262 + end
  263 +
  264 + group :x do
255 265 guard 'test' do
256 266 watch('c')
257 267 end

0 comments on commit b0d3090

Please sign in to comment.
Something went wrong with that request. Please try again.