features/step_definitions/remi_step.rb in remi-0.2.13 vs features/step_definitions/remi_step.rb in remi-0.2.14
- old
+ new
@@ -77,11 +77,11 @@
Given /^the source file uses a ([\w ]+) to quote embedded delimiters$/ do |quote_char|
expect(@brt.source.csv_options[:quote_char]).to eq Remi::BusinessRules.csv_opt_map[quote_char]
end
-Given /^the source file uses a preceeding ([\w ]+) to escape an embedded quoting character$/ do |escape_char|
+Given /^the source file uses a preceding ([\w ]+) to escape an embedded quoting character$/ do |escape_char|
expect(@brt.source.csv_options[:quote_char]).to eq Remi::BusinessRules.csv_opt_map[escape_char]
end
Given /^the source file uses ([\w ]+) line endings$/ do |line_endings|
expect(@brt.source.csv_options[:row_sep]).to eq Remi::BusinessRules.csv_opt_map[line_endings]
@@ -182,9 +182,17 @@
source_name, source_field_name = *Remi::BusinessRules.parse_full_field(source_field)
@brt.run_transforms
expect(@brt.target.field.value).to eq (@brt.sources[source_name].fields[source_field_name].value)
+end
+
+Then /^the target field '(.+)' is copied from the source field '([^:]+)'$/ do |target_field, source_field|
+ step "the target field '#{target_field}'"
+ step "the source field '#{source_field}'"
+
+ @brt.run_transforms
+ expect(@brt.target.field.value).to eq (@brt.source.fields[source_field].value)
end
Then /^the target field is (?:set to the value|populated with) "([^"]*)"$/ do |value|
@brt.run_transforms
expect(@brt.target.field.value).to eq Remi::BusinessRules::ParseFormula.parse(value)