Sha256: 9cd6489c42060f0ef66807f2d5d5f9594fb737cce2b331fe80469759daab2c4e
Contents?: true
Size: 603 Bytes
Versions: 1
Compression:
Stored size: 603 Bytes
Contents
module CurrentOrderMacrosFeature def stub_current_order_with(order) # selenium cant set cookie without page, poltergeist - vice versa visit('/') if Capybara.current_driver == :selenium_chrome create_cookie(Shopper::CurrentOrder::KEY, order.id) end end module CurrentOrderMacrosController def stub_current_order_with(order) allow_any_instance_of(ApplicationController).to receive(:current_order).and_return(order) end end RSpec.configure do |config| config.include CurrentOrderMacrosFeature, type: :feature config.include CurrentOrderMacrosController, type: :controller end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoppper-0.1.0 | spec/support/macroses/stub_current_order.rb |