Sha256: 116032dee30f9427e4903f4af227df2fca7509cc3939684893139423a508dca6

Contents?: true

Size: 1.47 KB

Versions: 9

Compression:

Stored size: 1.47 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

9 entries across 9 versions & 1 rubygems

Version Path
macros4cuke-0.4.08 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.07 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.06 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.05 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.04 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.03 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.02 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.01 spec/macros4cuke/formatter/to-null_spec.rb
macros4cuke-0.4.00 spec/macros4cuke/formatter/to-null_spec.rb