Sha256: cc556cf26c2a06cfd1825e75f970a87545c246439c58e196a99a50a13a2d392a
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 KB
Contents
require "#{File.dirname(__FILE__)}/../../spec_helper" describe 'Comment, Unit', :unit_test => true do let(:clazz) { CukeModeler::Comment } let(:model) { clazz.new } describe 'common behavior' do it_should_behave_like 'a model' it_should_behave_like 'a sourced model' it_should_behave_like 'a parsed model' end describe 'unique behavior' do it 'has text' do expect(model).to respond_to(:text) end it 'can change its text' do expect(model).to respond_to(:text=) model.text = :some_text expect(model.text).to eq(:some_text) model.text = :some_other_text expect(model.text).to eq(:some_other_text) end describe 'abstract instantiation' do context 'a new comment object' do let(:comment) { clazz.new } it 'starts with no text' do expect(comment.text).to be_nil end end end end describe 'comment output' do context 'from abstract instantiation' do let(:comment) { clazz.new } it 'can output an empty comment' do expect { comment.to_s }.to_not raise_error end end end end
Version data entries
3 entries across 3 versions & 1 rubygems