Sha256: e0bc2dd801e687de6d3b6113ad85bd9e0ae891c64621527b9132c1da19885cfa
Contents?: true
Size: 1005 Bytes
Versions: 9
Compression:
Stored size: 1005 Bytes
Contents
# frozen_string_literal: true require 'test_helper' module Vedeu class DSLModelTestClass attr_reader :name def initialize(name) @name = name end end # DSLModelTestClass class DSLModuleTestClass include Vedeu::DSL end # DSLTestClass describe DSL do let(:described) { Vedeu::DSL } let(:instance) { Vedeu::DSLModuleTestClass.new(model, client) } let(:model) { Vedeu::DSLModelTestClass.new(_name) } let(:client) {} let(:_name) {} describe '#name' do subject { instance.name } context 'when the model is nil' do let(:model) {} it { subject.must_equal(nil) } end context 'when the model is not nil' do context 'when the model has a name' do let(:_name) { :vedeu_dsl } it { subject.must_equal(_name) } end context 'when the model has no name' do it { subject.must_equal(nil) } end end end end # DSL end # Vedeu
Version data entries
9 entries across 9 versions & 1 rubygems