# New to Ruby - Data into a table and then verify said data

**URL:** <https://www.ruby-forum.com/t/new-to-ruby-data-into-a-table-and-then-verify-said-data/232739>\
**Category:** Ruby\
**Created:** [October 24, 2014, 7:43pm UTC](https://www.ruby-forum.com/t/new-to-ruby-data-into-a-table-and-then-verify-said-data/232739 "2014-10-24T19:43:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 24, 2014, 7:43pm UTC](https://www.ruby-forum.com/t/new-to-ruby-data-into-a-table-and-then-verify-said-data/232739/1 "2014-10-24T19:43:34Z")

</div>

Just started a new project coming from using Eclipse writing JUnit  
automation test cases now on my new project we’re using Cucumber to call  
Ruby. I’m trying to pass the data below into our backend, then verify  
that the data was actually written to the table.

I have zero knowledge of this.

we are using .feature files to make calls to the .rb file.

Here is what I have in the feature file

When the user saves vitals for the patient “10108V420871” and “path”  
“{“param” :  
{“dfn”:“3”,“duz”:“10000000224”,“locIEN”:“67”,“vitals”:[{“fileIEN”:“1”,“reading”:“200/98”,“qualifiers”:[“23”,“59”,“100”]},{“fileIEN”:“3”,“reading”:“100.3”,“qualifiers”:[“47”,“50”]}]}  
}”  
Then a successful response is returned  
Then the response contains “{“success”:true}”

and in the .rb file

Given(/^When the user saves vitals for the patient “(.\*?)”$/) do |pid|  
path = String.new(DefaultLogin.rdk\_url)  
HTTPartyWithBasicAuth.get\_with\_authorization(path+"/writeback/vitals/save?pid=10108V420871")

here is the error I get when I execute

@F129\_VitalSignsWriteBack @US1956\_VitalSignsWriteBack1 @F129 @US1956  
@debug @broken  
Feature: - Vital Signs - Add Vital Signs/BMI write-back RPC to RDK

Scenario: Vital Signs write back (save) from postman

# features/F129\_VitalSignsWriteBack.feature:5

```
When the user saves vitals for the patient "10108V420871" and "path"

```

“{“param” :  
{“dfn”:“3”,“duz”:“10000000224”,“locIEN”:“67”,“vitals”:[{“fileIEN”:“1”,“reading”:“200/98”,“qualifiers”:[“23”,“59”,“100”]},{“fileIEN”:“3”,“reading”:“100.3”,“qualifiers”:[“47”,“50”]}]}  
}” # features/F129\_VitalSignsWriteBack.feature:6  
Then a successful response is returned

# features/steps/common\_response\_steps.rb:5

```
Then the response contains "{"success":true}"

```

# features/steps/Medication\_steps.rb:50

1 scenario (1 undefined)  
3 steps (2 skipped, 1 undefined)  
0m0.009s
