soaspec 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b09938e8351c03ff15494fa89c411b85bd8af58c
4
- data.tar.gz: ce6cfc6a66d8d6c3e5d5fdba9a610641aed66dff
3
+ metadata.gz: 255d203844878ea2e75b0ef6ac282848d2363dbb
4
+ data.tar.gz: 99b6c40e7ba36d670fc7e16bbe1eee5760457082
5
5
  SHA512:
6
- metadata.gz: 9ba1180cc9d2fe32b560c78580d46ce12beb6a15c9bda03bddfac3349baa1fffb4fafdac92e1e5d0d030b5030965227401bc8e8ecd471b133f6aef726d9c4309
7
- data.tar.gz: f817ca8fa2e596e939c079a3ef04dca40961ee278195ceece0829dd53b5ecd62f8e334c160535d1f0992410ac21e01f2bbd530e14a37c685b582bfe3aaf05c63
6
+ metadata.gz: 8dbd21eb8c38debaf22104b30523eb017d367586c3b0a1e530216b63a0fb68da351318941c138925403ebe07121a3f12f3d32794adc7e015e1a89c2d0a64cd46
7
+ data.tar.gz: 3e299cd2d4a87dbf2cf1e9e36e4207840ce96947a510a686a73abad6803e809d3f985f793f1dfdbfe7efd5c39c4f9a2741bbe4109f5d7be959839758c79c6e90
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.0.22 / 2018-2-15
2
+ * Enhancements
3
+ * Created new 'include_in_body' matcher to find value anywhere in response body (which could be a substring of an element)
4
+
1
5
  Version 0.0.21 / 2018-1-29
2
6
  * Enhancements
3
7
  * Added soaspec-generate - still in POC mode to generate files from a WSDL.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- soaspec (0.0.21)
4
+ soaspec (0.0.22)
5
5
  rest-client (>= 2.0)
6
6
  rspec (~> 3.0)
7
7
  rspec-its (>= 1.2.0)
@@ -3,6 +3,8 @@ require_relative '../soaspec'
3
3
  # This represents a request / response pair
4
4
  class Exchange
5
5
 
6
+ attr_reader :api_class
7
+
6
8
  def initialize(name, override_parameters = {})
7
9
  @test_name = name.to_s
8
10
  @api_class = Soaspec::Environment.api_handler
@@ -2,6 +2,8 @@
2
2
  require_relative 'hash_methods'
3
3
  require_relative 'xpath_not_found'
4
4
 
5
+ # TODO: Mathcers are specific to SOAP. Make generic for REST and others by using actual.api_class
6
+
5
7
  RSpec::Matchers.define :contain_value do |expected|
6
8
  match do |actual|
7
9
  expect(actual.response.body.include_value?(expected)).to be true
@@ -12,6 +14,16 @@ RSpec::Matchers.define :contain_value do |expected|
12
14
  end
13
15
  end
14
16
 
17
+ RSpec::Matchers.define :include_in_body do |expected|
18
+ match do |actual|
19
+ expect(actual.response.to_xml.to_s.include?(expected)).to be true
20
+ end
21
+
22
+ failure_message do |actual|
23
+ "expected that #{actual.response.body.to_xml} would contain value #{expected}"
24
+ end
25
+ end
26
+
15
27
  RSpec::Matchers.define :contain_key do |expected|
16
28
  match do |actual|
17
29
  expect(actual.response.body.include_key?(expected)).to be true
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.21'
2
+ VERSION = '0.0.22'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-28 00:00:00.000000000 Z
11
+ date: 2018-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler