Skip to content

Commit ccb4c04

Browse files
committed
Fix user agent specs
1 parent 570ec89 commit ccb4c04

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

gems/aws-sdk-core/spec/aws/plugins/user_agent_spec.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ def setup(given)
1919
when 'os' then
2020
os_family = given['os']['family'].downcase
2121
version = given['os']['version']
22-
allow(Gem::Platform).to receive(:local).and_return(
23-
double('platform', os: os_family, version: version, cpu: nil)
24-
)
22+
allow(RbConfig::CONFIG).to receive(:[])
23+
.with('host_os').and_return(os_family)
24+
allow(RbConfig::CONFIG).to receive(:[])
25+
.with('host_cpu').and_return('x86_64')
26+
allow(Gem::Platform).to receive(:local)
27+
.and_return(double(version: version))
2528
when 'language'
2629
name = given['language']['name']
2730
version = given['language']['version']

gems/aws-sdk-core/spec/aws/plugins/user_agent_tests.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
{
3+
"description":"Kitchen Sink",
34
"given":{
45
"os":{
56
"family":"Linux",

0 commit comments

Comments
 (0)