Sha256: c2e15a587cd8d6e7e3fe4a59d1216cb25930d7e116a9618a50da6265563a4e73
Contents?: true
Size: 1.66 KB
Versions: 44
Compression:
Stored size: 1.66 KB
Contents
require 'test_helper' module Vedeu module DSL describe View do let(:described) { Vedeu::DSL::View } let(:instance) { described.new(model, client) } let(:model) { Vedeu::Views::View.new(name: 'actinium') } let(:client) {} describe '.renders' do subject { described.renders do # ... end } it { described.must_respond_to(:render) } it { subject.must_be_instance_of(Array) } context 'when the block is not given' do subject { described.renders } it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) } end context 'when the block is given' do it { subject.must_equal([]) } end end describe '.views' do subject { described.views do # ... end } it { subject.must_be_instance_of(Array) } context 'when the block is not given' do subject { described.views } it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) } end context 'when the block is given' do it { subject.must_equal([]) } end end describe '#lines' do subject { instance.lines do # ... end } it { subject.must_be_instance_of(Vedeu::Views::Lines) } context 'when the required block is not given' do subject { instance.lines } it { proc { subject }.must_raise(Vedeu::Error::RequiresBlock) } end it { instance.must_respond_to(:line) } end end # View end # DSL end # Vedeu
Version data entries
44 entries across 44 versions & 1 rubygems