Sha256: cf3e103786e117a6fea7d0297ef8a7023f393c22d526662289bda12457558938
Contents?: true
Size: 693 Bytes
Versions: 24
Compression:
Stored size: 693 Bytes
Contents
require 'spec_helper' require 'cuba_api/config' require 'cuba_api/write_aspect' module Plugin def one( obj, opts ) obj + "-one" end def two( obj, opts ) obj + "-two" end def three( obj, opts ) obj + "-three" end end describe CubaApi::WriteAspect do before do Cuba.plugin CubaApi::Config Cuba.plugin CubaApi::WriteAspect Cuba.plugin Plugin Cuba.append_aspect :one Cuba.prepend_aspect :two Cuba.append_aspect :three Cuba.define do on true do write 'start' end end end it 'should execute aspects in the right order' do _, _, resp = Cuba.call({}) resp.must.eq ["start-two-one-three"] end end
Version data entries
24 entries across 12 versions & 1 rubygems