slight changes to specs
This commit is contained in:
parent
526d769e22
commit
c749a311c3
@ -16,7 +16,7 @@ describe Guard::Linux do
|
||||
subject.should be_usable
|
||||
end
|
||||
|
||||
describe "#start", :long_running => true do
|
||||
describe "#start" do
|
||||
before(:each) do
|
||||
@listener = Guard::Linux.new
|
||||
end
|
||||
@ -40,7 +40,7 @@ describe Guard::Linux do
|
||||
|
||||
end
|
||||
|
||||
describe "#on_change", :long_running=> true do
|
||||
describe "#on_change" do
|
||||
before(:each) do
|
||||
@results = []
|
||||
@listener = Guard::Linux.new
|
||||
@ -56,7 +56,7 @@ describe Guard::Linux do
|
||||
FileUtils.touch file
|
||||
stop
|
||||
File.delete file
|
||||
@results.should == ['fixtures/newfile.rb']
|
||||
@results.should == ['spec/fixtures/newfile.rb']
|
||||
end
|
||||
|
||||
it "should catch file update" do
|
||||
@ -65,7 +65,7 @@ describe Guard::Linux do
|
||||
start
|
||||
File.open(file, 'w') {|f| f.write('') }
|
||||
stop
|
||||
@results.should == ['fixtures/folder1/file1.txt']
|
||||
@results.should == ['spec/fixtures/folder1/file1.txt']
|
||||
end
|
||||
|
||||
it "should catch files update" do
|
||||
@ -77,7 +77,7 @@ describe Guard::Linux do
|
||||
File.open(file1, 'w') {|f| f.write('') }
|
||||
File.open(file2, 'w') {|f| f.write('') }
|
||||
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
|
||||
|
||||
it "should catch deleted file" do
|
||||
@ -87,7 +87,7 @@ describe Guard::Linux do
|
||||
File.delete file
|
||||
stop
|
||||
FileUtils.touch file
|
||||
@results.should == ['fixtures/folder1/file1.txt']
|
||||
@results.should == ['spec/fixtures/folder1/file1.txt']
|
||||
end
|
||||
|
||||
it "should catch moved file" do
|
||||
@ -99,7 +99,7 @@ describe Guard::Linux do
|
||||
FileUtils.mv file1, file2
|
||||
stop
|
||||
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
|
||||
|
||||
it "should not process change if stopped" do
|
||||
|
@ -11,7 +11,7 @@ describe Guard::Polling do
|
||||
end
|
||||
end
|
||||
|
||||
describe "#on_change", :long_running => true do
|
||||
describe "#on_change" do
|
||||
it "catches new file" do
|
||||
file = @fixture_path.join("newfile.rb")
|
||||
File.exists?(file).should be_false
|
||||
@ -19,7 +19,7 @@ describe Guard::Polling do
|
||||
FileUtils.touch file
|
||||
stop
|
||||
File.delete file
|
||||
@results.should == ['fixtures/newfile.rb']
|
||||
@results.should == ['spec/fixtures/newfile.rb']
|
||||
end
|
||||
|
||||
it "catches file update" do
|
||||
@ -28,7 +28,7 @@ describe Guard::Polling do
|
||||
start
|
||||
FileUtils.touch file
|
||||
stop
|
||||
@results.should == ['fixtures/folder1/file1.txt']
|
||||
@results.should == ['spec/fixtures/folder1/file1.txt']
|
||||
end
|
||||
|
||||
it "catches files update" do
|
||||
@ -40,7 +40,7 @@ describe Guard::Polling do
|
||||
FileUtils.touch file1
|
||||
FileUtils.touch file2
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user