slight changes to specs

This commit is contained in:
Scott Parrish 2011-05-06 21:38:53 -06:00
parent 526d769e22
commit c749a311c3
2 changed files with 11 additions and 11 deletions

View File

@ -16,7 +16,7 @@ describe Guard::Linux do
subject.should be_usable subject.should be_usable
end end
describe "#start", :long_running => true do describe "#start" do
before(:each) do before(:each) do
@listener = Guard::Linux.new @listener = Guard::Linux.new
end end
@ -40,7 +40,7 @@ describe Guard::Linux do
end end
describe "#on_change", :long_running=> true do describe "#on_change" do
before(:each) do before(:each) do
@results = [] @results = []
@listener = Guard::Linux.new @listener = Guard::Linux.new
@ -56,7 +56,7 @@ describe Guard::Linux do
FileUtils.touch file FileUtils.touch file
stop stop
File.delete file File.delete file
@results.should == ['fixtures/newfile.rb'] @results.should == ['spec/fixtures/newfile.rb']
end end
it "should catch file update" do it "should catch file update" do
@ -65,7 +65,7 @@ describe Guard::Linux do
start start
File.open(file, 'w') {|f| f.write('') } File.open(file, 'w') {|f| f.write('') }
stop stop
@results.should == ['fixtures/folder1/file1.txt'] @results.should == ['spec/fixtures/folder1/file1.txt']
end end
it "should catch files update" do it "should catch files update" do
@ -77,7 +77,7 @@ describe Guard::Linux do
File.open(file1, 'w') {|f| f.write('') } File.open(file1, 'w') {|f| f.write('') }
File.open(file2, 'w') {|f| f.write('') } File.open(file2, 'w') {|f| f.write('') }
stop stop
@results.should == ['fixtures/folder1/file1.txt', 'fixtures/folder1/folder2/file2.txt'] @results.should == ['spec/fixtures/folder1/file1.txt', 'spec/fixtures/folder1/folder2/file2.txt']
end end
it "should catch deleted file" do it "should catch deleted file" do
@ -87,7 +87,7 @@ describe Guard::Linux do
File.delete file File.delete file
stop stop
FileUtils.touch file FileUtils.touch file
@results.should == ['fixtures/folder1/file1.txt'] @results.should == ['spec/fixtures/folder1/file1.txt']
end end
it "should catch moved file" do it "should catch moved file" do
@ -99,7 +99,7 @@ describe Guard::Linux do
FileUtils.mv file1, file2 FileUtils.mv file1, file2
stop stop
FileUtils.mv file2, file1 FileUtils.mv file2, file1
@results.should == ['fixtures/folder1/file1.txt', 'fixtures/folder1/movedfile1.txt'] @results.should == ['spec/fixtures/folder1/file1.txt', 'spec/fixtures/folder1/movedfile1.txt']
end end
it "should not process change if stopped" do it "should not process change if stopped" do

View File

@ -11,7 +11,7 @@ describe Guard::Polling do
end end
end end
describe "#on_change", :long_running => true do describe "#on_change" do
it "catches new file" do it "catches new file" do
file = @fixture_path.join("newfile.rb") file = @fixture_path.join("newfile.rb")
File.exists?(file).should be_false File.exists?(file).should be_false
@ -19,7 +19,7 @@ describe Guard::Polling do
FileUtils.touch file FileUtils.touch file
stop stop
File.delete file File.delete file
@results.should == ['fixtures/newfile.rb'] @results.should == ['spec/fixtures/newfile.rb']
end end
it "catches file update" do it "catches file update" do
@ -28,7 +28,7 @@ describe Guard::Polling do
start start
FileUtils.touch file FileUtils.touch file
stop stop
@results.should == ['fixtures/folder1/file1.txt'] @results.should == ['spec/fixtures/folder1/file1.txt']
end end
it "catches files update" do it "catches files update" do
@ -40,7 +40,7 @@ describe Guard::Polling do
FileUtils.touch file1 FileUtils.touch file1
FileUtils.touch file2 FileUtils.touch file2
stop stop
@results.sort.should == ['fixtures/folder1/file1.txt', 'fixtures/folder1/folder2/file2.txt'] @results.sort.should == ['spec/fixtures/folder1/file1.txt', 'spec/fixtures/folder1/folder2/file2.txt']
end end
end end