Permalink
Browse files

updated the watch spec to describe the tests better.

  • Loading branch information...
1 parent 33542ac commit a7b6ebeef1b0b4bd50de647712c9f2184d378864 @earlonrails committed Oct 7, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 spec/guard/watcher_spec.rb
View
@@ -128,16 +128,16 @@
described_class.match_files(@guard, ['spec_helper.rb', 'array.rb']).should == ['spec', ['foo', 'bar']]
end
- it "returns nothing if the action returns something other than a string or an array of strings" do
+ it "returns the evaluated addition argument in an array" do
described_class.match_files(@guard, ['addition.rb']).class.should == Array
described_class.match_files(@guard, ['addition.rb'])[0].should == 2
end
- it "returns nothing if the action response is empty" do
+ it "returns nothing if the action response is empty string" do
described_class.match_files(@guard, ['blank.rb']).should == ['']
end
- it "returns nothing if the action returns nothing" do
+ it "returns nothing if the action returns empty string" do
described_class.match_files(@guard, ['uptime.rb']).should == ['']
end
end
@@ -195,23 +195,23 @@
described_class.match_files(@guard, ['lib/my_wonderful_lib.rb']).should == ['spec/my_wonderful_lib_spec.rb']
end
- it "returns multiple files specified within the action" do
+ it "returns a hash specified within the action" do
described_class.match_files(@guard, ['hash.rb']).should == [{:foo => 'bar', :file_name => 'hash.rb'}]
end
it "returns multiple files by combining the results of different actions" do
described_class.match_files(@guard, ['lib/my_wonderful_lib.rb', 'array.rb']).should == ['spec/my_wonderful_lib_spec.rb', ['foo', 'bar', "array.rb"]]
end
- it "returns nothing if the action returns something other than a string or an array of strings" do
+ it "returns the evaluated addition argument + the path" do
described_class.match_files(@guard, ['addition.rb']).should == ["2addition.rb"]
end
- it "returns nothing if the action response is empty" do
+ it "returns nothing if the action response is empty string" do
described_class.match_files(@guard, ['blank.rb']).should == ['']
end
- it "returns nothing if the action returns nothing" do
+ it "returns nothing if the action returns empty string" do
described_class.match_files(@guard, ['uptime.rb']).should == ['']
end
end

0 comments on commit a7b6ebe

Please sign in to comment.