local_pac 0.1.13 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/{LICENSE.txt → LICENSE.md} +0 -0
  2. data/README.DEVELOPER.md +7 -0
  3. data/README.md +138 -2
  4. data/Rakefile +16 -8
  5. data/app/controllers/application_controller.rb +5 -3
  6. data/app/controllers/assets_controller.rb +3 -2
  7. data/app/controllers/file_serve_controller.rb +3 -6
  8. data/app/controllers/lookup_controller.rb +9 -9
  9. data/app/locales/en.yml +1 -0
  10. data/app/views/application.haml +1 -1
  11. data/bin/local_pac +49 -64
  12. data/config.ru +24 -7
  13. data/features/initializer.feature +4 -4
  14. data/features/show_status.feature +2 -2
  15. data/files/config.yaml +2 -2
  16. data/files/example-config.erb +10 -12
  17. data/files/git-hook.erb +1 -0
  18. data/lib/local_pac.rb +22 -5
  19. data/lib/local_pac/actions/create_directory.rb +2 -2
  20. data/lib/local_pac/actions/create_file.rb +8 -2
  21. data/lib/local_pac/actions/create_repository.rb +6 -8
  22. data/lib/local_pac/actions/get_system_information.rb +78 -0
  23. data/lib/local_pac/actions/print_newline.rb +19 -0
  24. data/lib/local_pac/actions/print_title.rb +41 -0
  25. data/lib/local_pac/actions/reload_configuration.rb +21 -0
  26. data/lib/local_pac/actions/reload_local_storage.rb +22 -0
  27. data/lib/local_pac/actions/send_signal.rb +32 -0
  28. data/lib/local_pac/actions/show_config.rb +10 -0
  29. data/lib/local_pac/actions/show_process_information.rb +94 -0
  30. data/lib/local_pac/application_status.rb +34 -0
  31. data/lib/local_pac/cli/helper.rb +34 -0
  32. data/lib/local_pac/cli/reload.rb +36 -0
  33. data/lib/local_pac/config.rb +15 -13
  34. data/lib/local_pac/exceptions.rb +6 -0
  35. data/lib/local_pac/file.rb +32 -0
  36. data/lib/local_pac/git.rb +20 -6
  37. data/lib/local_pac/git_repository.rb +40 -28
  38. data/lib/local_pac/git_storage.rb +60 -0
  39. data/lib/local_pac/initializer.rb +8 -5
  40. data/lib/local_pac/local_storage.rb +3 -4
  41. data/lib/local_pac/main.rb +2 -2
  42. data/lib/local_pac/{null_pac_file.rb → null_file.rb} +5 -1
  43. data/lib/local_pac/server.rb +1 -1
  44. data/lib/local_pac/spec_helper_file_server.rb +6 -5
  45. data/lib/local_pac/template_file.rb +1 -1
  46. data/lib/local_pac/template_repository.rb +3 -3
  47. data/lib/local_pac/version.rb +1 -1
  48. data/local_pac.gemspec +13 -9
  49. data/script/console +1 -1
  50. data/share/archlinux/PKGBUILD +4 -1
  51. data/share/archlinux/config.yaml +1 -1
  52. data/spec/actions/create_directory_spec.rb +3 -3
  53. data/spec/actions/create_file_spec.rb +23 -2
  54. data/spec/actions/create_repository_spec.rb +3 -3
  55. data/spec/actions/get_system_information_spec.rb +22 -0
  56. data/spec/actions/print_new_line_spec.rb +36 -0
  57. data/spec/actions/print_title_spec.rb +50 -0
  58. data/spec/actions/reload_configuration_spec.rb +38 -0
  59. data/spec/actions/reload_repository_spec.rb +35 -0
  60. data/spec/actions/send_signal_spec.rb +58 -0
  61. data/spec/actions/show_config_spec.rb +22 -0
  62. data/spec/actions/show_process_information_spec.rb +45 -0
  63. data/spec/application_status_spec.rb +40 -0
  64. data/spec/config_spec.rb +11 -11
  65. data/spec/features/fetch_proxy_pac_spec.rb +11 -10
  66. data/spec/features/lookup_proxy_spec.rb +32 -40
  67. data/spec/file_spec.rb +56 -0
  68. data/spec/git_spec.rb +13 -7
  69. data/spec/git_storage_spec.rb +64 -0
  70. data/spec/initializer_spec.rb +7 -5
  71. data/spec/{null_pac_file_spec.rb → null_file_spec.rb} +6 -6
  72. data/spec/proxy_pac/pac_result_html_stylist_spec.rb +3 -2
  73. data/spec/runner_spec.rb +1 -1
  74. data/spec/spec_helper.rb +2 -2
  75. data/spec/spec_helper_features.rb +2 -2
  76. data/spec/support/config.rb +5 -0
  77. data/spec/support/filesystem.rb +1 -1
  78. data/spec/support/git.rb +23 -2
  79. data/spec/support/helper_features.rb +23 -0
  80. data/spec/template_repository_spec.rb +2 -2
  81. metadata +113 -32
  82. data/lib/local_pac/git_file.rb +0 -18
  83. data/lib/local_pac/pac_file.rb +0 -27
  84. data/spec/git_repository_spec.rb +0 -60
  85. data/spec/pac_file_spec.rb +0 -44
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Actions::PrintTitle do
5
+ context '#initialize' do
6
+ it 'requires a title' do
7
+ expect {
8
+ Actions::PrintTitle.new('title')
9
+ }.not_to raise_error
10
+ end
11
+
12
+ it 'accepts a title width as well' do
13
+ expect {
14
+ Actions::PrintTitle.new('title', 25)
15
+ }.not_to raise_error
16
+ end
17
+ end
18
+
19
+ context '#run' do
20
+ it 'prints a title' do
21
+ action = Actions::PrintTitle.new('Hello World')
22
+
23
+ result = capture(:stdout) do
24
+ action.run
25
+ end
26
+
27
+ expect(result).to include('Hello World')
28
+ end
29
+
30
+ it 'prints a title with #' do
31
+ action = Actions::PrintTitle.new('Hello World' )
32
+
33
+ result = capture(:stdout) do
34
+ action.run
35
+ end
36
+
37
+ expect(result).to eq("###############\n# Hello World #\n###############\n\n")
38
+ end
39
+
40
+ it 'prints a title with 25 #' do
41
+ action = Actions::PrintTitle.new('Hello World', 25 )
42
+
43
+ result = capture(:stdout) do
44
+ action.run
45
+ end
46
+
47
+ expect(result).to eq("###########################\n####### Hello World #######\n###########################\n\n")
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,38 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Actions::ReloadConfiguration do
5
+ context '#initialize' do
6
+ it 'accepts a config instance' do
7
+ config = double(config)
8
+
9
+ expect {
10
+ Actions::ReloadConfiguration.new(config)
11
+ }.not_to raise_error
12
+ end
13
+ end
14
+
15
+ context '#run' do
16
+ it 'reloads configuration from known places' do
17
+ config_file = create_file 'config.yaml', <<-EOS.strip_heredoc
18
+ ---
19
+ :gem_path: '/asdf/bin/local_pac'
20
+ EOS
21
+
22
+ LocalPac.config = LocalPac::Config.new(config_file)
23
+
24
+ config_file = create_file 'config.yaml', <<-EOS.strip_heredoc
25
+ ---
26
+ :gem_path: 'asdf'
27
+ EOS
28
+
29
+ config = LocalPac::Config.new(config_file)
30
+
31
+ with_environment 'HOME' => working_directory do
32
+ Actions::ReloadConfiguration.new(config).run
33
+ end
34
+
35
+ expect(LocalPac.config.gem_path).to eq('asdf')
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,35 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Actions::ReloadLocalStorage do
5
+ context '#initialize' do
6
+ it 'requires a sinatra app' do
7
+ expect {
8
+ Actions::ReloadLocalStorage.new(sintra_app)
9
+ }
10
+ end
11
+ end
12
+
13
+ context '#run' do
14
+ it 'reloads local storage' do
15
+ storage = double('local_storage')
16
+
17
+ sintra_app = double('sintra_app')
18
+ expect(sintra_app).to receive(:set).with(:local_storage, storage)
19
+
20
+ Actions::ReloadLocalStorage.new(sintra_app, storage).run
21
+ end
22
+
23
+ it 'reloads local storage for multiple apps' do
24
+ storage = double('local_storage')
25
+
26
+ sintra_app1 = double('sintra_app1')
27
+ expect(sintra_app1).to receive(:set).with(:local_storage, storage)
28
+
29
+ sintra_app2 = double('sintra_app2')
30
+ expect(sintra_app2).to receive(:set).with(:local_storage, storage)
31
+
32
+ Actions::ReloadLocalStorage.new([sintra_app1, sintra_app2], storage).run
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Actions::SendSignal do
5
+ context '#initialize' do
6
+ it 'requires a signal' do
7
+ expect {
8
+ Actions::SendSignal.new
9
+ }.to raise_error ArgumentError
10
+ end
11
+
12
+ it 'accepts a pid_file' do
13
+ expect {
14
+ Actions::SendSignal.new(:USR1, 'asdf')
15
+ }.not_to raise_error
16
+ end
17
+ end
18
+
19
+ context '#run' do
20
+ it 'sends a signal to process' do
21
+ read_pipe, write_pipe = IO.pipe
22
+
23
+ unless child_pid = Kernel.fork # Child process
24
+ read_pipe.close
25
+
26
+ trap :USR1 do
27
+ write_pipe.print "Received signal"
28
+ write_pipe.close
29
+ Kernel.exit!
30
+ end
31
+
32
+ loop { sleep 1 }
33
+ end
34
+
35
+ write_pipe.close
36
+
37
+ pid_file = create_file 'pid_file', child_pid
38
+
39
+ sleep 1
40
+
41
+ Actions::SendSignal.new(:USR1, pid_file).run
42
+
43
+ expect(read_pipe.read).to eq('Received signal')
44
+ read_pipe.close
45
+ end
46
+
47
+ it 'logs a warning if pid file does not exist' do
48
+ LocalPac.ui_logger.level = ::Logger::WARN
49
+
50
+ result = capture(:stderr) do
51
+ Actions::SendSignal.new(:USR1, 'pid_file').run
52
+ end
53
+
54
+ expect(result).to include("does not exist. I'm not able to send daemon signal")
55
+ end
56
+
57
+ end
58
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Actions::ShowConfig do
5
+ context '#initialize' do
6
+ it 'has no special requirements' do
7
+ expect {
8
+ Actions::ShowConfig.new
9
+ }.not_to raise_error
10
+ end
11
+ end
12
+
13
+ context '#run' do
14
+ it 'gathers all relevant information and prints them to stdout' do
15
+ result = capture(:stdout) do
16
+ Actions::ShowConfig.new.run
17
+ end
18
+
19
+ expect(result).to include('pid_file')
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,45 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe Actions::ShowProcessInformation do
5
+ context '#initialize' do
6
+ it 'requires a pid or a pid file' do
7
+ expect {
8
+ Actions::ShowProcessInformation.new($$)
9
+ }.not_to raise_error
10
+
11
+ file = create_file 'pid_file', '1'
12
+
13
+ expect {
14
+ Actions::ShowProcessInformation.new(::File.new(file))
15
+ }.not_to raise_error
16
+ end
17
+ end
18
+
19
+ context '#run' do
20
+ it 'gathers information about a running process' do
21
+ result = capture(:stdout) do
22
+ Actions::ShowProcessInformation.new($$).run
23
+ end
24
+
25
+ expect(result).to include('pid')
26
+ expect(result).to include($$.to_s)
27
+ end
28
+
29
+ it 'reports an error if process cannot be found' do
30
+ result = capture(:stdout) do
31
+ Actions::ShowProcessInformation.new(99999999999).run
32
+ end
33
+
34
+ expect(result).to include('Process "99999999999" cannot be found. It is not a running process.')
35
+ end
36
+
37
+ it 'reports an error if process cannot be found and gives a hint if pid file was used.' do
38
+ result = capture(:stdout) do
39
+ Actions::ShowProcessInformation.new('/path/not/exist').run
40
+ end
41
+
42
+ expect(result).to include('Pid-file /path/not/exist cannot be found. Please choose a correct path and try again.')
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,40 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+
4
+ describe ApplicationStatus do
5
+ context '#initialize' do
6
+ it 'has no special requirements' do
7
+ expect {
8
+ ApplicationStatus.new
9
+ }.not_to raise_error
10
+ end
11
+
12
+ it 'let you deactivate paging' do
13
+ expect {
14
+ ApplicationStatus.new(pager: false)
15
+ }.not_to raise_error
16
+ end
17
+ end
18
+
19
+ context '#show' do
20
+ it 'show application status' do
21
+ config_string = <<-EOS.strip_heredoc
22
+ :pid_file: #{::File.join(working_directory, 'run', 'pid')}
23
+ EOS
24
+
25
+ config_file = create_file('config.yaml', config_string)
26
+ pid_file = create_file('run/pid', $$)
27
+
28
+ config = LocalPac::Config.new(config_file)
29
+
30
+ result = capture(:stdout) do
31
+ ApplicationStatus.new(pager: false, config: config).show
32
+ end
33
+
34
+ expect(result).to include('osfamily')
35
+ expect(result).to include('pid_file')
36
+ expect(result).to include('pid_file')
37
+ expect(result).to include('cmdline')
38
+ end
39
+ end
40
+ end
@@ -23,7 +23,7 @@ describe LocalPac::Config do
23
23
 
24
24
  it 'returns default value if no config file is available' do
25
25
  config = LocalPac::Config.new(config_file)
26
- file = File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'run', 'pid')
26
+ file = ::File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'run', 'pid')
27
27
 
28
28
  expect(config.pid_file).to eq(file)
29
29
  end
@@ -33,37 +33,37 @@ describe LocalPac::Config do
33
33
  it 'returns value of config file' do
34
34
  config_file = create_file 'config.yaml', <<-EOS.strip_heredoc
35
35
  ---
36
- :local_storage: '/asdf/pid'
36
+ :local_storage: '/asdf/storage.git'
37
37
  EOS
38
38
 
39
39
  config = LocalPac::Config.new(config_file)
40
- expect(config.local_storage).to eq('/asdf/pid')
40
+ expect(config.local_storage).to eq('/asdf/storage.git')
41
41
  end
42
42
 
43
43
  it 'returns default value if no config file is available' do
44
44
  config = LocalPac::Config.new(config_file)
45
- file = File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'data')
45
+ file = ::File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'data', 'storage.git')
46
46
 
47
47
  expect(config.local_storage).to eq(file)
48
48
  end
49
49
  end
50
50
 
51
- context '#log_sink' do
51
+ context '#access_log' do
52
52
  it 'returns value of config file' do
53
53
  config_file = create_file 'config.yaml', <<-EOS.strip_heredoc
54
54
  ---
55
- :log_sink: '/asdf/log'
55
+ :access_log: '/asdf/log/access.log'
56
56
  EOS
57
57
 
58
58
  config = LocalPac::Config.new(config_file)
59
- expect(config.log_sink).to eq('/asdf/log')
59
+ expect(config.access_log).to eq('/asdf/log/access.log')
60
60
  end
61
61
 
62
62
  it 'returns default value if no config file is available' do
63
63
  config = LocalPac::Config.new(config_file)
64
- file = File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'log')
64
+ file = ::File.join(ENV['HOME'], '.local', 'share', 'local_pac', 'log', 'access.log')
65
65
 
66
- expect(config.log_sink).to eq(file)
66
+ expect(config.access_log).to eq(file)
67
67
  end
68
68
  end
69
69
 
@@ -80,7 +80,7 @@ describe LocalPac::Config do
80
80
 
81
81
  it 'returns default value if no config file is available' do
82
82
  config = LocalPac::Config.new(config_file)
83
- file = File.expand_path('../../bin/local_pac', __FILE__)
83
+ file = ::File.expand_path('../../bin/local_pac', __FILE__)
84
84
 
85
85
  expect(config.executable).to eq(file)
86
86
  end
@@ -107,7 +107,7 @@ describe LocalPac::Config do
107
107
  context '#to_s' do
108
108
  it 'outputs a nice config overview' do
109
109
  config = LocalPac::Config.new(config_file)
110
- expect(config.to_s).to include File.join('.local', 'share', 'local_pac', 'run', 'pid')
110
+ expect(config.to_s).to include ::File.join('.local', 'share', 'local_pac', 'run', 'pid')
111
111
  end
112
112
  end
113
113
 
@@ -16,7 +16,8 @@ describe 'Fetch proxy pac', :type => :feature do
16
16
 
17
17
  before :each do
18
18
  git_init(git_repo)
19
- create_file(File.join(git_repo, 'file.pac'), valid_pac_file)
19
+ git_set_author(git_repo)
20
+ create_file(::File.join(git_repo, 'file.pac'), valid_pac_file)
20
21
  git_add(git_repo, 'file.pac')
21
22
  git_commit(git_repo)
22
23
  end
@@ -26,11 +27,11 @@ describe 'Fetch proxy pac', :type => :feature do
26
27
  include FeduxOrg::Stdlib::Filesystem
27
28
 
28
29
  def root_directory
29
- File.expand_path('../../../', __FILE__)
30
+ ::File.expand_path('../../../', __FILE__)
30
31
  end
31
32
 
32
33
  def local_storage
33
- File.join(working_directory, 'git_repo', '.git')
34
+ ::File.join(working_directory, 'git_repo', '.git')
34
35
  end
35
36
  end.new
36
37
 
@@ -38,27 +39,27 @@ describe 'Fetch proxy pac', :type => :feature do
38
39
  Capybara.app = LocalPac::App::FileServeController
39
40
  end
40
41
 
41
- it 'finds an existing proxy pac', :focus do
42
+ it 'finds an existing proxy pac' do
42
43
  visit('/file.pac')
43
44
  expect(page).to have_content('function FindProxyForURL(){return"DIRECT"}')
44
45
  end
45
46
 
46
- it 'exits with 404 if file does not exist', :focus do
47
+ it 'exits with 404 if file does not exist' do
47
48
  visit('/does_not_exist.pac')
48
49
  expect(page.status_code).to eq(404)
49
50
  end
50
51
 
51
- it 'compresses data for transit if requested', :focus do
52
+ it 'compresses data for transit if requested' do
52
53
  def app
53
54
  config = Class.new do
54
55
  include FeduxOrg::Stdlib::Filesystem
55
56
 
56
57
  def root_directory
57
- File.expand_path('../../../', __FILE__)
58
+ ::File.expand_path('../../../', __FILE__)
58
59
  end
59
60
 
60
61
  def local_storage
61
- File.join(working_directory, 'git_repo', '.git')
62
+ ::File.join(working_directory, 'git_repo', '.git')
62
63
  end
63
64
  end.new
64
65
 
@@ -78,11 +79,11 @@ describe 'Fetch proxy pac', :type => :feature do
78
79
  include FeduxOrg::Stdlib::Filesystem
79
80
 
80
81
  def root_directory
81
- File.expand_path('../../../', __FILE__)
82
+ ::File.expand_path('../../../', __FILE__)
82
83
  end
83
84
 
84
85
  def local_storage
85
- File.join(working_directory, 'git_repo', '.git')
86
+ ::File.join(working_directory, 'git_repo', '.git')
86
87
  end
87
88
  end.new
88
89
 
@@ -2,8 +2,8 @@
2
2
  require 'spec_helper'
3
3
  require 'spec_helper_features'
4
4
 
5
- describe 'Fetch proxy pac' do
6
- context '/v1/pac' do
5
+ describe 'Lookup proxy for url' do
6
+ context '/v1/lookup' do
7
7
  let(:valid_pac_file) do <<-EOS.strip_heredoc.chomp
8
8
  function FindProxyForURL(url, host) {
9
9
  return "DIRECT";
@@ -29,7 +29,8 @@ describe 'Fetch proxy pac' do
29
29
 
30
30
  before(:each) do
31
31
  git_init(git_repo)
32
- create_file(File.join(git_repo, 'file.pac'), valid_pac_file)
32
+ git_set_author(git_repo)
33
+ create_file(::File.join(git_repo, 'file.pac'), valid_pac_file)
33
34
  git_add(git_repo, 'file.pac')
34
35
  git_commit(git_repo)
35
36
  end
@@ -39,11 +40,11 @@ describe 'Fetch proxy pac' do
39
40
  include FeduxOrg::Stdlib::Filesystem
40
41
 
41
42
  def root_directory
42
- File.expand_path('../../../', __FILE__)
43
+ ::File.expand_path('../../../', __FILE__)
43
44
  end
44
45
 
45
46
  def local_storage
46
- File.join(working_directory, 'git_repo', '.git')
47
+ ::File.join(working_directory, 'git_repo', '.git')
47
48
  end
48
49
  end.new
49
50
 
@@ -51,52 +52,43 @@ describe 'Fetch proxy pac' do
51
52
  Capybara.app = LocalPac::App::LookupController
52
53
  end
53
54
 
54
- it 'looks up proxy', :focus do
55
+ it 'looks up proxy for valid url' do
56
+ search_for 'http://www.example.org', 'You asked me to look up'
57
+ end
58
+
59
+ it 'returns a error message for a invalid url' do
55
60
  visit('/file.pac')
56
61
  within('#search') do
57
- fill_in 'url', :with => 'http://www.example.org'
62
+ fill_in 'url', :with => '§ASDF$$'
58
63
  end
59
- expect(page).to have_content('asdf')
60
- end
61
-
62
- it 'shows a result output' do
63
- rendered_view = <<-EOS.strip_heredoc
64
- EOS
65
- response = post('/file.pac', {:url => 'http://example.org'})
66
- expect(last_response).to be_ok
67
- expect(response.body).to eq('Please enter fully quallified url')
64
+ click_on('Search')
65
+ expect(page).to have_content('Invalid URL...')
68
66
  end
69
67
 
70
- it 'handles a nil file as well' do
71
- create_file(File.join(git_repo, 'file_nil.pac'), pac_file_return_nil)
72
- git_add(git_repo, 'file_nil.pac')
73
- git_commit(git_repo)
74
-
75
- rendered_view = <<-EOS.strip_heredoc
76
- EOS
77
-
78
- response = post('/file_nil.pac', {:url => 'http://example.org'})
68
+ it 'returns a error message for a invalid url on the second page' do
69
+ visit('/file.pac')
70
+ within('#search') do
71
+ fill_in 'url', :with => 'http://www.example.org'
72
+ end
73
+ click_on('Search')
79
74
 
80
- expect(last_response).to be_ok
81
- expect(response.body).to eq(rendered_view)
82
- end
75
+ within('#search') do
76
+ fill_in 'url', :with => '§ASDF$$'
77
+ end
83
78
 
84
- it 'raises an exception on invalid pac file' do
85
- create_file(File.join(git_repo, 'invalid.pac'), invalid_pac_file)
86
- git_add(git_repo, 'invalid.pac')
87
- git_commit(git_repo)
79
+ click_on('Search')
88
80
 
89
- expect {
90
- response = post('/invalid.pac', {:url => 'http://example.org'})
91
- }.to raise_error RuntimeError
81
+ expect(page).to have_content('Invalid URL...')
92
82
  end
93
83
 
94
- it 'returns a result for an existing proxy pac' do
95
- pending
84
+ it 'returns a error message for a invalid url' do
85
+ visit('/file.pac')
86
+ within('#search') do
87
+ fill_in 'url', :with => ''
88
+ end
89
+ click_on('Search')
90
+ expect(page).to have_content('Invalid URL...')
96
91
  end
97
92
 
98
- it 'returns a error if file does not exist' do
99
- pending
100
- end
101
93
  end
102
94
  end