You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a tool using aws-sdk gem v2, and implmenting tests with stubbed API requests.
I'd like to stub response including nil value, like this:
client=Aws::RDS::Client.newclient.describe_db_parameters(db_parameter_group_name: "hoge").parameters[2]=>#<structparameter_name="archive_timeout",parameter_value="300",description="Timeout seconds for archiving",source="system",apply_type="dynamic",data_type="integer",allowed_values="0-2147483647",is_modifiable=false,minimum_engine_version=nil,apply_method=nil>
However, the actual stubbed response is this:
client=Aws::RDS::Client.new(stub_responses: true)db_parameters=[{parameter_name: "archive_timeout",parameter_value: "300",description: "Timeout seconds for archiving",source: "system",apply_type: "dynamic",data_type: "integer",allowed_values: "0-214748364",is_modifiable: false,minimum_engine_version: nil,apply_method: nil}]client.stub_responses(:describe_db_parameters,db_parameters)client.describe_db_parameters(db_parameter_group_name: "hoge").parameters[0]=>#<structparameter_name="archive_timeout",parameter_value="300",description="Timeout seconds for archiving",source="system",apply_type="dynamic",data_type="integer",allowed_values="0-214748364",is_modifiable=false,minimum_engine_version="String",apply_method="ApplyMethod">
nil value is converted to another default value by #stub_scalar method.
Is there any way to stub nil-included response?
Thanks.
The text was updated successfully, but these errors were encountered:
Hello,
I'm developing a tool using aws-sdk gem v2, and implmenting tests with stubbed API requests.
I'd like to stub response including
nil
value, like this:However, the actual stubbed response is this:
nil
value is converted to another default value by#stub_scalar
method.Is there any way to stub
nil
-included response?Thanks.
The text was updated successfully, but these errors were encountered: