Skip to content

Commit

Permalink
Add specs to ensure #259 is fixed! :)
Browse files Browse the repository at this point in the history
  • Loading branch information
rymai committed Mar 10, 2012
1 parent 81788d8 commit 2f1bf34
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions spec/guard/dsl_describer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

describe Guard::DslDescriber do

let(:describer) { ::Guard::DslDescriber }

let(:guardfile) do
<<-GUARD
guard :test, :a => :b do
guard :test, :a => :b, :c => :d do
watch('c')
end
group :a do
guard 'test', :x => 1 do
guard 'test', :x => 1, :y => 2 do
watch('c')
end
end
Expand All @@ -36,7 +34,7 @@
describe '.list' do
it "lists the available Guards when they're declared as strings or symbols" do
Guard.stub(:guard_gem_names).and_return ['test', 'another', 'even', 'more']
describer.list(:guardfile_contents => guardfile)
described_class.list(:guardfile_contents => guardfile)
@output.should eql <<OUTPUT
Using inline Guardfile.
Available guards:
Expand All @@ -53,13 +51,13 @@

describe '.show' do
it 'shows the Guards and their options' do
describer.show(:guardfile_contents => guardfile)
described_class.show(:guardfile_contents => guardfile)
@output.should eql <<OUTPUT
Using inline Guardfile.
(global):
test: a => :b
test: a => :b, c => :d
Group a:
test: x => 1
test: x => 1, y => 2
Group b:
another
Expand Down

1 comment on commit 2f1bf34

@netzpirat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superb!

Please sign in to comment.