mock_server 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mock_server/playback.rb +4 -5
  2. metadata +2 -2
@@ -74,19 +74,18 @@ module MockServer
74
74
  recorded_response[:body] = JSON.parse(recorded_response[:body]) rescue recorded_response[:body]
75
75
  recorded_response = Hashie::Mash.new recorded_response
76
76
 
77
- if matcher[:matcher]
78
- result = true
77
+ result = if matcher[:matcher]
79
78
  begin
80
- matcher[:matcher].call(request, recorded_request, recorded_response)
79
+ result = matcher[:matcher].call(request, recorded_request, recorded_response)
81
80
  rescue => matcher_err
82
81
  store_matcher_exception(matcher_err)
83
82
  result = false
84
- ensure
85
- result
86
83
  end
84
+ result
87
85
  else
88
86
  true
89
87
  end
88
+ result == true
90
89
  }
91
90
  }
92
91
  data
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mock_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-27 00:00:00.000000000 Z
14
+ date: 2012-07-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rack