public
Created

Stubbing Active Orders

  • Download Gist
stubbing_active_orders_1.rb
Ruby
1 2 3 4
order = ...
stub(orders = Object.new).active {[order]}
stub(user = Object.new).orders {orders}
stub(UserSession).current_user {user}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.