Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No need to deleted file if it doesn't exist

  • Loading branch information...
commit e092776044e8f6e3e58578d3474a45f1894e68a2 1 parent 596f3b9
@sferik authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 spec/cli_spec.rb
View
6 spec/cli_spec.rb
@@ -71,10 +71,12 @@
end
context 'empty RC file' do
before do
- @cli.options = @cli.options.merge('profile' => project_path + '/tmp/empty', 'display-uri' => true)
+ file_path = project_path + '/tmp/empty'
+ @cli.options = @cli.options.merge('profile' => file_path, 'display-uri' => true)
end
after do
- File.delete(project_path + '/tmp/empty')
+ file_path = project_path + '/tmp/empty'
+ File.delete(file_path) if File.exist?(file_path)
end
it 'requests the correct resource' do
expect(Readline).to receive(:readline).with('Press [Enter] to open the Twitter Developer site. ', true).and_return("\n")
Please sign in to comment.
Something went wrong with that request. Please try again.