Module: DutyFree::Cucumber::Extensions

Defined in:
lib/duty_free/frameworks/cucumber.rb

Overview

Helper method for enabling DutyFree in Cucumber features.

Instance Method Summary collapse

Instance Method Details

#with_df_importingObject



15
16
17
18
19
20
21
22
23
# File 'lib/duty_free/frameworks/cucumber.rb', line 15

def with_df_importing
  was_enabled = ::DutyFree.enabled?
  ::DutyFree.enabled = true
  begin
    yield
  ensure
    ::DutyFree.enabled = was_enabled
  end
end