-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathenv.rb
29 lines (24 loc) · 886 Bytes
/
env.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$: << File.expand_path("../../../lib", __FILE__)
require "pry"
require "fix_spec"
require "fix_spec/cucumber"
def last_fix
@last_fix
end
Around('@with_data_dictionary') do |scenario, block|
FIXSpec.data_dictionary = FIXSpec::DataDictionary.new "features/support/FIX42.xml"
block.call
FIXSpec.data_dictionary = nil
end
Around('@with_data_dictionary', '@fix50') do |scenario, block|
FIXSpec.application_data_dictionary = FIXSpec::DataDictionary.new "features/support/FIX50SP1.xml"
FIXSpec.session_data_dictionary = FIXSpec::DataDictionary.new "features/support/FIXT11.xml"
block.call
FIXSpec.application_data_dictionary = nil
FIXSpec.session_data_dictionary = nil
end
Around('@ignore_length_and_checksum') do |scenario, block|
JsonSpec.excluded_keys=%w(CheckSum BodyLength)
block.call
JsonSpec.excluded_keys=JsonSpec::Configuration::DEFAULT_EXCLUDED_KEYS
end