lbspec 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lbspec/capture.rb +1 -1
- data/lib/lbspec/respond.rb +1 -1
- data/lib/lbspec/version.rb +1 -1
- data/spec/lbspec_respond_spec.rb +6 -1
- metadata +4 -4
data/lib/lbspec/capture.rb
CHANGED
data/lib/lbspec/respond.rb
CHANGED
@@ -21,7 +21,7 @@ RSpec::Matchers.define :respond do |expect|
|
|
21
21
|
protocol: @protocol, application: @application,
|
22
22
|
path: @path, options: @options)
|
23
23
|
@output_request = request.send(@string)
|
24
|
-
@output_request.
|
24
|
+
@output_request.match(expect)
|
25
25
|
end
|
26
26
|
|
27
27
|
chain :tcp do
|
data/lib/lbspec/version.rb
CHANGED
data/spec/lbspec_respond_spec.rb
CHANGED
@@ -38,6 +38,11 @@ describe '#respond' do
|
|
38
38
|
'vhost_a:443/test'.should_not respond('404')
|
39
39
|
.https.from('node_a')
|
40
40
|
end
|
41
|
+
it 'should test vhost:443/test does respond /^404/' do
|
42
|
+
Lbspec::Util.stub(:exec_command).and_return '404 Not Found'
|
43
|
+
'vhost_a:443/test'.should respond(/^404/)
|
44
|
+
.https.from('node_a')
|
45
|
+
end
|
41
46
|
end
|
42
47
|
context 'tcp/udp' do
|
43
48
|
it 'should test vhost:25/tcp respond 220' do
|
@@ -47,7 +52,7 @@ describe '#respond' do
|
|
47
52
|
end
|
48
53
|
it 'should test vhost:53/udp respond ' do
|
49
54
|
Lbspec::Util.stub(:exec_command).and_return '220'
|
50
|
-
'vhost_a:
|
55
|
+
'vhost_a:53'.should respond('220')
|
51
56
|
.udp.with('HELO test.example.com')
|
52
57
|
end
|
53
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lbspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -188,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
segments:
|
190
190
|
- 0
|
191
|
-
hash:
|
191
|
+
hash: 677344431770284692
|
192
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
193
|
none: false
|
194
194
|
requirements:
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
segments:
|
199
199
|
- 0
|
200
|
-
hash:
|
200
|
+
hash: 677344431770284692
|
201
201
|
requirements: []
|
202
202
|
rubyforge_project:
|
203
203
|
rubygems_version: 1.8.21
|