Module: Danconia::TestHelpers
- Defined in:
- lib/danconia/test_helpers.rb
Class Method Summary collapse
Class Method Details
.with_config(&block) ⇒ Object
4 5 6 7 8 |
# File 'lib/danconia/test_helpers.rb', line 4 def with_config &block old_config = Danconia.config.dup Danconia.configure &block Danconia.config = old_config end |
.with_rates(rates) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/danconia/test_helpers.rb', line 10 def with_rates rates with_config do |config| config.default_exchange = Exchanges::FixedRates.new rates: rates yield end end |