Sha256: 0ebd0531f3e1cfb0ac59d1e8983361755ad58ba38f3e01e419200dd3d8a4d9b3

Contents?: true

Size: 971 Bytes

Versions: 7

Compression:

Stored size: 971 Bytes

Contents

# File: comment_spec.rb

require_relative '../../spec_helper'

# Load the classes under test
require_relative '../../../lib/macros4cuke/templating/comment'

module Macros4Cuke
module Templating # Open this namespace to get rid of module qualifier prefixes
describe Comment do
  let(:sample_text) { 'Some text' }
  
  subject { Comment.new(sample_text) }

  context 'Creation and initialization:' do
    it 'should be created with a text' do
      expect { Comment.new(sample_text) }.not_to raise_error
    end
    
    it 'should know its source text' do
      expect(subject.source).to eq(sample_text)
    end
    
  end # context
  
  context 'Provided services:' do
    it 'should render tan empty text' do
      context = double('fake_context')
      locals = double('fake_locals')
      
      expect(subject.render(context, locals)).to be_empty
    end
  end # context  
end # describe
end # module
end # module

# End of file

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
macros4cuke-0.5.14 spec/macros4cuke/templating/comment_spec.rb
macros4cuke-0.5.13 spec/macros4cuke/templating/comment_spec.rb
macros4cuke-0.5.12 spec/macros4cuke/templating/comment_spec.rb
macros4cuke-0.5.11 spec/macros4cuke/templating/comment_spec.rb
macros4cuke-0.5.10 spec/macros4cuke/templating/comment_spec.rb
macros4cuke-0.5.09 spec/macros4cuke/templating/comment_spec.rb
macros4cuke-0.5.08 spec/macros4cuke/templating/comment_spec.rb