features/step_definitions/remi_step.rb in remi-0.2.27 vs features/step_definitions/remi_step.rb in remi-0.2.28
- old
+ new
@@ -108,21 +108,21 @@
Given /^the (source|target) file contains at least the following headers in no particular order:$/ do |st, table|
table.rows.each do |row|
field = row.first
step "the #{st} field '#{field}'"
end
- expect(@brt.send(st.to_sym).data_obj.fields.keys).to include(*@brt.send(st.to_sym).fields.field_names)
+ expect(@brt.send(st.to_sym).data_subject.df.vectors.to_a).to include(*@brt.send(st.to_sym).fields.field_names)
end
Given /^the (source|target) file contains all of the following headers in this order:$/ do |st, table|
table.rows.each do |row|
field = row.first
step "the #{st} field '#{field}'"
end
@brt.run_transforms if st == 'target'
- expect(@brt.send(st.to_sym).data_obj.fields.keys).to eq @brt.send(st.to_sym).fields.field_names
+ expect(@brt.send(st.to_sym).data_subject.df.vectors.to_a).to eq @brt.send(st.to_sym).fields.field_names
end
### Source
@@ -186,11 +186,11 @@
Given /^the source field '([^']+)' is parsed with the date format "([^"]*)"$/ do |source_field, date_format|
step "the source field '#{source_field}'"
source_name, source_field_name = @brt.sources.parse_full_field(source_field)
- expect(@brt.sources[source_name].fields[source_field_name].metadata[:format]).to eq date_format
+ expect(@brt.sources[source_name].fields[source_field_name].metadata[:in_format]).to eq date_format
end
Given /^the source field is parsed with the date format "([^"]*)"$/ do |date_format|
@brt.sources.fields.each do |field|
step "the source field '#{field.full_name}' is parsed with the date format \"#{date_format}\""
@@ -450,12 +450,12 @@
step "the target field '#{target_field}'"
source_name, source_field_name = @brt.sources.parse_full_field(source_field)
target_names, target_field_name = @brt.targets.parse_full_field(target_field, multi: true)
- source_format = @brt.sources[source_name].fields[source_field_name].metadata[:format]
- source_reformatted = Remi::Transform[:format_date].(from_fmt: source_format, to_fmt: target_format)
+ source_format = @brt.sources[source_name].fields[source_field_name].metadata[:in_format]
+ source_reformatted = Remi::Transform::FormatDate.new(in_format: source_format, out_format: target_format).to_proc
.call(@brt.sources[source_name].fields[source_field_name].value)
@brt.run_transforms
target_names.each do |target_name|
expect(@brt.targets[target_name].fields[target_field_name].value).to eq source_reformatted
@@ -590,10 +590,10 @@
field = row.first
step "the target field '#{field}'"
end
@brt.run_transforms
- expect(@brt.target.data_obj.fields.keys).to match_array @brt.target.fields.field_names
+ expect(@brt.target.data_subject.df.vectors.to_a).to match_array @brt.target.fields.field_names
end
### Record-level expectations
Then /^the record from source '(.+)' should be (?i)(Retained|Rejected)(?-i)(?: without error|)$/ do |source_name, action|