smarteru 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +0,0 @@
1
- require 'test/unit'
2
- require 'webmock/test_unit'
3
-
4
- require 'smarteru'
5
-
6
- class Test::Unit::TestCase
7
- ACCESS_CREDENTIALS = {
8
- account_api_key: "abc",
9
- user_api_key: "abc"
10
- }
11
-
12
- def stub_v2_api_call(operation, payload_package_xml)
13
- filename = "#{operation}.xml"
14
- stub_request(:post, 'https://api.smarteru.com/apiv2/')
15
- .with(:body => {"Package"=>"#{payload_package_xml}"})
16
- .to_return(
17
- body: expected_body(filename),
18
- status: 200
19
- )
20
- end
21
-
22
- def request_payload(filename)
23
- File.read(File.join(File.dirname(__FILE__), 'support/requests/' << filename))
24
- end
25
-
26
- def expected_body(filename)
27
- File.read(File.join(File.dirname(__FILE__), 'support/responses/' << filename))
28
- end
29
- end