Sha256: c040802b30ae8f54b46193c8614172bbcb8aba3cc250ea089eee21458a2793fa

Contents?: true

Size: 1.39 KB

Versions: 10

Compression:

Stored size: 1.39 KB

Contents

# File: to-null_spec.rb

require_relative '../../spec_helper'

# Load mix-in module for creating a sample collection of macro-steps
require_relative '../use-sample-collection'


require_relative '../../../lib/macros4cuke/formatting-service'
# Load the class under test
require_relative '../../../lib/macros4cuke/formatter/to-null'

module Macros4Cuke
module Formatter # Open this namespace to get rid of module qualifier prefixes
describe ToNull do
  include UseSampleCollection # Add convenience methods for sample collection

  before(:all) do
    # Fill the collection of macro-steps with sample steps
    fill_collection
  end

  after(:all) do
    # Clear the collection to prevent interference between spec files
    macro_coll.clear
  end


  context 'Initialization:' do
    it 'should be created without parameter' do
      expect { ToNull.new }.not_to raise_error
    end

    it 'should react to all the notifications' do
      instance = ToNull.new
      expect(instance.implements).to eq(Formatter::AllNotifications)
    end
  end # context


  context 'Provided services:' do
    # Default instantiation rule
    subject { ToNull.new }

    it 'should render a given macro-step collection' do
      service = FormattingService.new
      service.register(subject)
      expect { service.start!(macro_coll) }.not_to raise_error
    end
  end # context
end # describe
end # module
end # module


# End of file

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
macros4cuke-0.5.18 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.16 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.15 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.14 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.13 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.12 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.11 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.10 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.09 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.5.08 spec/macros4cuke/formatter/to-null_spec.rb