proxy_tester 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/Gemfile.lock +85 -67
- data/features/step_definitions.rb +1 -1
- data/lib/proxy_tester/actions/handle_error.rb +9 -11
- data/lib/proxy_tester/error_handler.rb +18 -21
- data/lib/proxy_tester/git_repository.rb +1 -1
- data/lib/proxy_tester/rspec/matchers/have_requests_with_status_code.rb +2 -2
- data/lib/proxy_tester/rspec/matchers/reference_domains.rb +2 -2
- data/lib/proxy_tester/rspec/matchers/return_proxy.rb +2 -2
- data/lib/proxy_tester/version.rb +1 -1
- data/proxy_tester.gemspec +2 -2
- data/spec/actions/add_examples_to_test_cases_directory_spec.rb +1 -1
- data/spec/actions/add_test_case_spec.rb +1 -1
- data/spec/actions/create_directory_spec.rb +2 -2
- data/spec/actions/create_file_spec.rb +3 -3
- data/spec/actions/initialize_application_spec.rb +6 -6
- data/spec/git_file_spec.rb +1 -1
- data/spec/rspec_runner_spec.rb +3 -3
- data/spec/support/rspec.rb +1 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88e621906421d1c202cb1c24efdc2f1ad1178de8
|
4
|
+
data.tar.gz: 196aa6248f2e9df7d23ea48ce4be78026c2029fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aaafded1e7afbb01bc5dfa51bb0e37fdc94f6f45c010792403badee234eba02c910c6b3cb45de0530f7806a290fd213c401c1a1046be95180035505e67d5abc
|
7
|
+
data.tar.gz: d3487007f645efae55ba0a718a97aa6d7a855cd753c4910ba51e29dc64a8a6de664f86f2fabbb7f6ae12528eb5218f0b351c563f2e24a42446c1f8ab11e64db7
|
data/.rspec
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
proxy_tester (0.1.
|
4
|
+
proxy_tester (0.1.7)
|
5
5
|
activerecord (~> 4.0)
|
6
6
|
activesupport (~> 4.0)
|
7
7
|
addressable
|
8
8
|
crypt_keeper
|
9
9
|
excon
|
10
|
-
fuubar
|
10
|
+
fuubar (>= 2.0.0rc)
|
11
11
|
highline
|
12
12
|
i18n
|
13
13
|
poltergeist
|
14
14
|
proxy_pac_rb (~> 0.2.5)
|
15
|
-
rspec
|
15
|
+
rspec (>= 3.0.0)
|
16
|
+
rspec-legacy_formatters
|
16
17
|
rugged
|
17
18
|
sqlite3
|
18
19
|
therubyracer
|
@@ -21,24 +22,26 @@ PATH
|
|
21
22
|
GEM
|
22
23
|
remote: https://rubygems.org/
|
23
24
|
specs:
|
24
|
-
activemodel (4.0.
|
25
|
-
activesupport (= 4.0.
|
25
|
+
activemodel (4.0.8)
|
26
|
+
activesupport (= 4.0.8)
|
26
27
|
builder (~> 3.1.0)
|
27
|
-
activerecord (4.0.
|
28
|
-
activemodel (= 4.0.
|
28
|
+
activerecord (4.0.8)
|
29
|
+
activemodel (= 4.0.8)
|
29
30
|
activerecord-deprecated_finders (~> 1.0.2)
|
30
|
-
activesupport (= 4.0.
|
31
|
+
activesupport (= 4.0.8)
|
31
32
|
arel (~> 4.0.0)
|
32
33
|
activerecord-deprecated_finders (1.0.3)
|
33
|
-
activesupport (4.0.
|
34
|
-
i18n (~> 0.6, >= 0.6.
|
34
|
+
activesupport (4.0.8)
|
35
|
+
i18n (~> 0.6, >= 0.6.9)
|
35
36
|
minitest (~> 4.2)
|
36
37
|
multi_json (~> 1.3)
|
37
38
|
thread_safe (~> 0.1)
|
38
39
|
tzinfo (~> 0.3.37)
|
39
40
|
addressable (2.3.6)
|
41
|
+
aes (0.5.0)
|
40
42
|
arel (4.0.2)
|
41
|
-
|
43
|
+
armor (0.0.3)
|
44
|
+
aruba (0.6.0)
|
42
45
|
childprocess (>= 0.3.6)
|
43
46
|
cucumber (>= 1.1.1)
|
44
47
|
rspec-expectations (>= 2.7.0)
|
@@ -48,13 +51,13 @@ GEM
|
|
48
51
|
byebug (2.7.0)
|
49
52
|
columnize (~> 0.3)
|
50
53
|
debugger-linecache (~> 1.2)
|
51
|
-
capybara (2.
|
54
|
+
capybara (2.4.1)
|
52
55
|
mime-types (>= 1.16)
|
53
56
|
nokogiri (>= 1.3.3)
|
54
57
|
rack (>= 1.0.0)
|
55
58
|
rack-test (>= 0.5.4)
|
56
59
|
xpath (~> 2.0)
|
57
|
-
childprocess (0.5.
|
60
|
+
childprocess (0.5.3)
|
58
61
|
ffi (~> 1.0, >= 1.0.11)
|
59
62
|
cliver (0.3.2)
|
60
63
|
coderay (1.1.0)
|
@@ -67,104 +70,118 @@ GEM
|
|
67
70
|
thor
|
68
71
|
crack (0.4.2)
|
69
72
|
safe_yaml (~> 1.0.0)
|
70
|
-
crypt_keeper (0.
|
71
|
-
activerecord (>= 3.
|
72
|
-
activesupport (>= 3.
|
73
|
-
|
73
|
+
crypt_keeper (0.18.1)
|
74
|
+
activerecord (>= 3.1, < 4.2)
|
75
|
+
activesupport (>= 3.1, < 4.2)
|
76
|
+
aes (~> 0.5.0)
|
77
|
+
armor (~> 0.0.2)
|
78
|
+
cucumber (1.3.15)
|
74
79
|
builder (>= 2.1.2)
|
75
80
|
diff-lcs (>= 1.1.3)
|
76
81
|
gherkin (~> 2.12)
|
77
82
|
multi_json (>= 1.7.5, < 2.0)
|
78
|
-
multi_test (>= 0.
|
79
|
-
database_cleaner (1.
|
83
|
+
multi_test (>= 0.1.1)
|
84
|
+
database_cleaner (1.3.0)
|
80
85
|
debugger-linecache (1.2.0)
|
81
86
|
diff-lcs (1.2.5)
|
82
|
-
docile (1.1.
|
83
|
-
dotenv (0.
|
87
|
+
docile (1.1.5)
|
88
|
+
dotenv (0.11.1)
|
89
|
+
dotenv-deployment (~> 0.0.2)
|
90
|
+
dotenv-deployment (0.0.2)
|
84
91
|
erubis (2.7.0)
|
85
|
-
excon (0.
|
92
|
+
excon (0.38.0)
|
86
93
|
factory_girl (4.4.0)
|
87
94
|
activesupport (>= 3.0.0)
|
88
95
|
fedux_org-stdlib (0.6.11)
|
89
96
|
activesupport
|
90
97
|
ffi (1.9.3)
|
91
|
-
filegen (0.4.
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
+
filegen (0.4.3)
|
99
|
+
activesupport
|
100
|
+
foreman (0.74.0)
|
101
|
+
dotenv (~> 0.11.1)
|
102
|
+
thor (~> 0.19.1)
|
103
|
+
fuubar (2.0.0.rc1)
|
104
|
+
rspec (~> 3.0.rc1)
|
105
|
+
ruby-progressbar (~> 1.4)
|
98
106
|
gherkin (2.12.2)
|
99
107
|
multi_json (~> 1.3)
|
100
108
|
highline (1.6.21)
|
101
|
-
httparty (0.13.
|
109
|
+
httparty (0.13.1)
|
102
110
|
json (~> 1.8)
|
103
111
|
multi_xml (>= 0.5.2)
|
104
112
|
i18n (0.6.11)
|
105
113
|
json (1.8.1)
|
106
114
|
libv8 (3.16.14.3)
|
107
|
-
license_finder (
|
115
|
+
license_finder (1.1.0)
|
108
116
|
bundler
|
109
117
|
httparty
|
110
|
-
rake
|
111
118
|
sequel
|
112
119
|
sqlite3
|
113
120
|
thor
|
121
|
+
xml-simple
|
114
122
|
method_source (0.8.2)
|
115
|
-
mime-types (2.
|
116
|
-
mini_portile (0.
|
123
|
+
mime-types (2.3)
|
124
|
+
mini_portile (0.6.0)
|
117
125
|
minitest (4.7.5)
|
118
126
|
multi_json (1.10.1)
|
119
|
-
multi_test (0.
|
127
|
+
multi_test (0.1.1)
|
120
128
|
multi_xml (0.5.5)
|
121
|
-
|
122
|
-
|
123
|
-
|
129
|
+
netrc (0.7.7)
|
130
|
+
nokogiri (1.6.2.1)
|
131
|
+
mini_portile (= 0.6.0)
|
132
|
+
poltergeist (1.5.1)
|
124
133
|
capybara (~> 2.1)
|
125
134
|
cliver (~> 0.3.1)
|
126
135
|
multi_json (~> 1.0)
|
127
136
|
websocket-driver (>= 0.2.0)
|
128
|
-
proxy_pac_rb (0.2.
|
137
|
+
proxy_pac_rb (0.2.6)
|
129
138
|
activesupport
|
130
139
|
addressable
|
131
|
-
pry (0.
|
132
|
-
coderay (~> 1.0)
|
133
|
-
method_source (~> 0.8)
|
140
|
+
pry (0.10.0)
|
141
|
+
coderay (~> 1.1.0)
|
142
|
+
method_source (~> 0.8.1)
|
134
143
|
slop (~> 3.4)
|
135
|
-
pry-byebug (1.3.
|
144
|
+
pry-byebug (1.3.3)
|
136
145
|
byebug (~> 2.7)
|
137
|
-
pry (~> 0.
|
146
|
+
pry (~> 0.10)
|
138
147
|
pry-doc (0.6.0)
|
139
148
|
pry (~> 0.9)
|
140
149
|
yard (~> 0.8)
|
141
150
|
rack (1.5.2)
|
142
|
-
rack-protection (1.5.
|
151
|
+
rack-protection (1.5.3)
|
143
152
|
rack
|
144
153
|
rack-test (0.6.2)
|
145
154
|
rack (>= 1.0)
|
146
|
-
rake (10.
|
155
|
+
rake (10.3.2)
|
147
156
|
ref (1.0.5)
|
148
|
-
rest-client (1.
|
149
|
-
mime-types (>= 1.16)
|
150
|
-
|
151
|
-
|
152
|
-
rspec-
|
153
|
-
rspec-
|
154
|
-
|
155
|
-
rspec-
|
156
|
-
|
157
|
-
rspec-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
157
|
+
rest-client (1.7.2)
|
158
|
+
mime-types (>= 1.16, < 3.0)
|
159
|
+
netrc (~> 0.7)
|
160
|
+
rspec (3.0.0)
|
161
|
+
rspec-core (~> 3.0.0)
|
162
|
+
rspec-expectations (~> 3.0.0)
|
163
|
+
rspec-mocks (~> 3.0.0)
|
164
|
+
rspec-core (3.0.2)
|
165
|
+
rspec-support (~> 3.0.0)
|
166
|
+
rspec-expectations (3.0.2)
|
167
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
168
|
+
rspec-support (~> 3.0.0)
|
169
|
+
rspec-legacy_formatters (1.0.0)
|
170
|
+
rspec-core (>= 3.0.0.beta2)
|
171
|
+
rspec-support (>= 3.0.0.beta2)
|
172
|
+
rspec-mocks (3.0.2)
|
173
|
+
rspec-support (~> 3.0.0)
|
174
|
+
rspec-support (3.0.2)
|
175
|
+
ruby-progressbar (1.5.1)
|
176
|
+
rugged (0.21.0)
|
177
|
+
safe_yaml (1.0.3)
|
178
|
+
sequel (4.12.0)
|
162
179
|
simplecov (0.8.2)
|
163
180
|
docile (~> 1.1.0)
|
164
181
|
multi_json
|
165
182
|
simplecov-html (~> 0.8.0)
|
166
183
|
simplecov-html (0.8.0)
|
167
|
-
sinatra (1.4.
|
184
|
+
sinatra (1.4.5)
|
168
185
|
rack (~> 1.4)
|
169
186
|
rack-protection (~> 1.4)
|
170
187
|
tilt (~> 1.3, >= 1.3.4)
|
@@ -175,22 +192,23 @@ GEM
|
|
175
192
|
therubyracer (0.12.1)
|
176
193
|
libv8 (~> 3.16.14.0)
|
177
194
|
ref
|
178
|
-
thor (0.
|
195
|
+
thor (0.19.1)
|
179
196
|
thread_safe (0.3.4)
|
180
197
|
tilt (1.4.1)
|
181
|
-
tins (1.0
|
198
|
+
tins (1.3.0)
|
182
199
|
tmrb (1.2.7)
|
183
200
|
thor
|
184
201
|
tzinfo (0.3.40)
|
185
202
|
versionomy (0.4.4)
|
186
203
|
blockenspiel (>= 0.4.5)
|
187
|
-
webmock (1.
|
188
|
-
addressable (>= 2.
|
204
|
+
webmock (1.18.0)
|
205
|
+
addressable (>= 2.3.6)
|
189
206
|
crack (>= 0.3.2)
|
190
|
-
websocket-driver (0.3.
|
207
|
+
websocket-driver (0.3.4)
|
208
|
+
xml-simple (1.1.4)
|
191
209
|
xpath (2.0.0)
|
192
210
|
nokogiri (~> 1.3)
|
193
|
-
yard (0.8.7.
|
211
|
+
yard (0.8.7.4)
|
194
212
|
|
195
213
|
PLATFORMS
|
196
214
|
ruby
|
@@ -24,7 +24,7 @@ end
|
|
24
24
|
Then(/^a repository named "(.*?)" should exist$/) do |repository|
|
25
25
|
in_current_dir do
|
26
26
|
with_environment 'HOME' => working_directory do
|
27
|
-
expect(File.exist? File.expand_path(repository)).to
|
27
|
+
expect(File.exist? File.expand_path(repository)).to be_truthy
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -5,23 +5,21 @@ module ProxyTester
|
|
5
5
|
|
6
6
|
private
|
7
7
|
|
8
|
-
attr_reader :handler_klass, :
|
8
|
+
attr_reader :exception, :original_message, :handler_klass, :backtrace
|
9
9
|
|
10
10
|
public
|
11
11
|
|
12
12
|
def initialize(exception, handler_klass = ErrorHandler)
|
13
|
-
@exception
|
14
|
-
@
|
13
|
+
@exception = exception.class
|
14
|
+
@original_message = exception.message
|
15
|
+
@backtrace = exception.backtrace
|
16
|
+
@handler_klass = handler_klass
|
15
17
|
end
|
16
18
|
|
17
19
|
def run
|
18
|
-
handler
|
19
|
-
|
20
|
-
|
21
|
-
handler.cause = exception.cause
|
22
|
-
else
|
23
|
-
handler.cause = exception
|
24
|
-
end
|
20
|
+
handler = handler_klass.find exception
|
21
|
+
handler.original_message = original_message
|
22
|
+
handler.backtrace = backtrace
|
25
23
|
|
26
24
|
handler.execute(parsed_message)
|
27
25
|
end
|
@@ -29,7 +27,7 @@ module ProxyTester
|
|
29
27
|
private
|
30
28
|
|
31
29
|
def parsed_message
|
32
|
-
result = JSON.parse(
|
30
|
+
result = JSON.parse(original_message)
|
33
31
|
return {} unless result.kind_of? Hash
|
34
32
|
|
35
33
|
result
|
@@ -11,18 +11,19 @@ module ProxyTester
|
|
11
11
|
|
12
12
|
private
|
13
13
|
|
14
|
-
attr_reader :details_i18n, :summary_i18n
|
14
|
+
attr_reader :details_i18n, :summary_i18n
|
15
15
|
|
16
16
|
public
|
17
17
|
|
18
|
-
attr_reader :exception
|
19
|
-
attr_accessor :
|
18
|
+
attr_reader :exception, :status_code, :exit_code
|
19
|
+
attr_accessor :original_message, :backtrace
|
20
20
|
|
21
21
|
def initialize(options = {})
|
22
22
|
@exception = options.fetch(:exception)
|
23
23
|
@details_i18n = options.fetch(:details)
|
24
24
|
@summary_i18n = options.fetch(:summary)
|
25
|
-
@exit_code = options.fetch(:exit_code)
|
25
|
+
@exit_code = options.fetch(:exit_code, 1)
|
26
|
+
@status_code = options.fetch(:status_code, :internal_server_error)
|
26
27
|
rescue KeyError => e
|
27
28
|
raise ArgumentError, e.message
|
28
29
|
end
|
@@ -36,7 +37,7 @@ module ProxyTester
|
|
36
37
|
end
|
37
38
|
|
38
39
|
def find(exception)
|
39
|
-
handlers.find(proc { default_handler }) { |h| h.exception == exception
|
40
|
+
handlers.find(proc { default_handler }) { |h| h.exception == exception }
|
40
41
|
end
|
41
42
|
|
42
43
|
private
|
@@ -44,7 +45,7 @@ module ProxyTester
|
|
44
45
|
def default_handler
|
45
46
|
mutex.synchronize do
|
46
47
|
@default_handler ||= new(
|
47
|
-
exception:
|
48
|
+
exception: StandardError,
|
48
49
|
details: 'errors.default.details',
|
49
50
|
summary: 'errors.default.summary',
|
50
51
|
exit_code: 99,
|
@@ -87,30 +88,26 @@ module ProxyTester
|
|
87
88
|
use(data)
|
88
89
|
|
89
90
|
ProxyTester.ui_logger.fatal details
|
90
|
-
ProxyTester.ui_logger.debug
|
91
|
-
ProxyTester.ui_logger.debug "
|
92
|
-
|
93
|
-
if cause
|
94
|
-
ProxyTester.ui_logger.debug "Cause: #{cause.class}"
|
95
|
-
ProxyTester.ui_logger.debug "Cause Message: #{cause.message}"
|
96
|
-
ProxyTester.ui_logger.debug "Cause Backtrace:\n" + Array(cause.backtrace).join("\n")
|
97
|
-
end
|
98
|
-
|
91
|
+
ProxyTester.ui_logger.debug original_message if original_message
|
92
|
+
ProxyTester.ui_logger.debug "Original Backtrace follows\n" + backtrace.join("\n") if backtrace
|
99
93
|
Kernel.exit exit_code
|
100
94
|
end
|
101
95
|
|
102
|
-
def
|
96
|
+
def to_hash
|
103
97
|
ErrorHandler.mutex.synchronize do
|
104
98
|
@details ||= I18n.t(details_i18n)
|
105
99
|
@summary ||= I18n.t(summary_i18n)
|
106
100
|
end
|
107
101
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
102
|
+
{
|
103
|
+
error_summary: summary,
|
104
|
+
error_details: details,
|
105
|
+
result: :failure,
|
106
|
+
}
|
113
107
|
end
|
114
108
|
|
109
|
+
def to_json
|
110
|
+
JSON.dump(to_hash)
|
111
|
+
end
|
115
112
|
end
|
116
113
|
end
|
@@ -97,7 +97,7 @@ module ProxyTester
|
|
97
97
|
def files_in_repository
|
98
98
|
return [] if repository.empty?
|
99
99
|
|
100
|
-
head_commit = repository.
|
100
|
+
head_commit = repository.head.target
|
101
101
|
|
102
102
|
files = []
|
103
103
|
head_commit.tree.walk_blobs(:postorder) do |root, entry|
|
@@ -4,14 +4,14 @@ RSpec::Matchers.define :have_requests_with_status_code do |expected|
|
|
4
4
|
domains_eq? actual, expected
|
5
5
|
end
|
6
6
|
|
7
|
-
|
7
|
+
failure_message do |actual|
|
8
8
|
expected_domains = format_domains(expected)
|
9
9
|
actual_domains = format_domains(extract_domains(actual))
|
10
10
|
|
11
11
|
"expected that \"#{actual.current_url}\" references with the given http status codes:\n#{expected_domains}\n\nBut it references with the given http status codes:\n#{actual_domains}\n"
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
failure_message_when_negated do |actual|
|
15
15
|
expected_domains = format_domains(expected)
|
16
16
|
actual_domains = format_domains(extract_domains(actual))
|
17
17
|
|
@@ -5,14 +5,14 @@ RSpec::Matchers.define :reference_domains do |expected|
|
|
5
5
|
domains_eq? actual, expected
|
6
6
|
end
|
7
7
|
|
8
|
-
|
8
|
+
failure_message do |actual|
|
9
9
|
expected_domains = format_domains(expected)
|
10
10
|
actual_domains = format_domains(extract_domains(actual))
|
11
11
|
|
12
12
|
"expected that \"#{actual.current_url}\" references:\n#{expected_domains}\n\nBut it references:\n#{actual_domains}\n"
|
13
13
|
end
|
14
14
|
|
15
|
-
|
15
|
+
failure_message_when_negated do |actual|
|
16
16
|
expected_domains = format_domains(expected)
|
17
17
|
actual_domains = format_domains(extract_domains(actual))
|
18
18
|
|
@@ -4,11 +4,11 @@ RSpec::Matchers.define :return_proxy do |expected|
|
|
4
4
|
actual.verbatim == expected
|
5
5
|
end
|
6
6
|
|
7
|
-
|
7
|
+
failure_message do |actual|
|
8
8
|
"expected that \"#{actual.pac_file}\" returns \"#{expected}\", but it returns \"#{actual.verbatim}\" as proxy."
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
failure_message_when_negated do |actual|
|
12
12
|
"expected that \"#{actual.pac_file}\" not returns \"#{expected}\", but it returns \"#{actual.verbatim}\" as proxy."
|
13
13
|
end
|
14
14
|
|
data/lib/proxy_tester/version.rb
CHANGED
data/proxy_tester.gemspec
CHANGED
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_runtime_dependency 'activesupport', '~>4.0'
|
24
24
|
spec.add_runtime_dependency 'sqlite3'
|
25
25
|
spec.add_runtime_dependency 'crypt_keeper'
|
26
|
-
spec.add_runtime_dependency 'rspec'
|
27
|
-
spec.add_runtime_dependency 'fuubar'
|
26
|
+
spec.add_runtime_dependency 'rspec', '>= 3.0.0'
|
27
|
+
spec.add_runtime_dependency 'fuubar', '>=2.0.0rc'
|
28
28
|
spec.add_runtime_dependency 'rspec-legacy_formatters'
|
29
29
|
spec.add_runtime_dependency 'thor'
|
30
30
|
spec.add_runtime_dependency 'i18n'
|
@@ -15,7 +15,7 @@ describe Actions::CreateDirectory do
|
|
15
15
|
action.run
|
16
16
|
end
|
17
17
|
|
18
|
-
expect(path_exists?('repo')).to
|
18
|
+
expect(path_exists?('repo')).to be_truthy
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'respects existing path' do
|
@@ -53,7 +53,7 @@ describe Actions::CreateDirectory do
|
|
53
53
|
action.run
|
54
54
|
end
|
55
55
|
|
56
|
-
expect(path_exists?('file')).to
|
56
|
+
expect(path_exists?('file')).to be_truthy
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -39,7 +39,7 @@ describe Actions::CreateFile do
|
|
39
39
|
action.run
|
40
40
|
end
|
41
41
|
|
42
|
-
expect(path_exists?('file')).to
|
42
|
+
expect(path_exists?('file')).to be_truthy
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'creates sub directories' do
|
@@ -61,7 +61,7 @@ describe Actions::CreateFile do
|
|
61
61
|
action.run
|
62
62
|
end
|
63
63
|
|
64
|
-
expect(path_exists?('data/file')).to
|
64
|
+
expect(path_exists?('data/file')).to be_truthy
|
65
65
|
end
|
66
66
|
it 'respects existing path' do
|
67
67
|
repository = double('TemplateRepository')
|
@@ -133,7 +133,7 @@ describe Actions::CreateFile do
|
|
133
133
|
action.run
|
134
134
|
end
|
135
135
|
|
136
|
-
expect(path_exists?('file')).to
|
136
|
+
expect(path_exists?('file')).to be_truthy
|
137
137
|
end
|
138
138
|
end
|
139
139
|
end
|
@@ -28,12 +28,12 @@ describe Actions::InitializeApplication do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
expect(path_exists?('config/user_file.csv')).to
|
32
|
-
expect(path_exists?('config/config.yaml')).to
|
33
|
-
expect(path_exists?('test_cases.d')).to
|
34
|
-
expect(path_exists?('test_cases.d/examples/support')).to
|
35
|
-
expect(path_exists?('test_cases.d/examples/example_spec.rb')).to
|
36
|
-
expect(path_exists?('test_cases.d/examples/spec_helper.rb')).to
|
31
|
+
expect(path_exists?('config/user_file.csv')).to be_truthy
|
32
|
+
expect(path_exists?('config/config.yaml')).to be_truthy
|
33
|
+
expect(path_exists?('test_cases.d')).to be_truthy
|
34
|
+
expect(path_exists?('test_cases.d/examples/support')).to be_truthy
|
35
|
+
expect(path_exists?('test_cases.d/examples/example_spec.rb')).to be_truthy
|
36
|
+
expect(path_exists?('test_cases.d/examples/spec_helper.rb')).to be_truthy
|
37
37
|
expect(result).to include('config_file:')
|
38
38
|
end
|
39
39
|
end
|
data/spec/git_file_spec.rb
CHANGED
data/spec/rspec_runner_spec.rb
CHANGED
@@ -16,17 +16,17 @@ describe RspecRunner do
|
|
16
16
|
context '#to_s' do
|
17
17
|
it 'returns command string' do
|
18
18
|
runner = RspecRunner.new(test_cases_directory: working_directory)
|
19
|
-
expect(runner.to_s).to eq('--color --format Fuubar --order rand .')
|
19
|
+
expect(runner.to_s).to eq('--require rspec/legacy_formatters --color --format Fuubar --order rand .')
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'uses tag if given' do
|
23
23
|
runner = RspecRunner.new(test_cases_directory: working_directory, tags: 'my_tag')
|
24
|
-
expect(runner.to_s).to eq('--color --format Fuubar --order rand --tag my_tag .')
|
24
|
+
expect(runner.to_s).to eq('--require rspec/legacy_formatters --color --format Fuubar --order rand --tag my_tag .')
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'uses multiple tags if given' do
|
28
28
|
runner = RspecRunner.new(test_cases_directory: working_directory, tags: ['my_tag', 'new_tag'])
|
29
|
-
expect(runner.to_s).to eq('--color --format Fuubar --order rand --tag my_tag --tag new_tag .')
|
29
|
+
expect(runner.to_s).to eq('--require rspec/legacy_formatters --color --format Fuubar --order rand --tag my_tag --tag new_tag .')
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
data/spec/support/rspec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxy_tester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Günnewig
|
@@ -72,28 +72,28 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.0.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.0.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: fuubar
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 2.0.0rc
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 2.0.0rc
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec-legacy_formatters
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|