Skip to content

Instantly share code, notes, and snippets.

View andriy-baran's full-sized avatar
🎯
Focusing

andriy-baran

🎯
Focusing
View GitHub Profile
include_context 'api session'
let(:path) { "/api/v1/#{order_id}/line" }
let(:order_id) { 456 }
context 'when do some complex things' do
let(:order) { FactoryBot.create(:order) }
let(:order_id) { order.id }
let(:item) { LineItem.last }
let(:valid_params) do
{
module Configurable
def config(*attrs)
@configuration ||= Struct.new(*attrs).new
end
def configure
yield(@configuration) if block_given?
end
end