Check that files stay unchanged in write mode.
This commit is contained in:
parent
9a18902495
commit
7da4a0e0f0
1 changed files with 9 additions and 0 deletions
|
@ -125,4 +125,13 @@ describe FormatStaged do
|
|||
repo.stage 'test.test'
|
||||
expect { repo.run_formatter }.to raise_error
|
||||
end
|
||||
|
||||
it 'leaves files alone when write is false' do
|
||||
repo.set_content 'test.test', 'a=b'
|
||||
repo.stage 'test.test'
|
||||
|
||||
expect(repo.run_formatter write: false).to be_truthy
|
||||
expect(repo.get_content('test.test')).to eq 'a=b'
|
||||
expect(repo.get_staged('test.test')).to eq 'a=b'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue