Sha256: a350e9d6850c5d017a395a4fe336e0cf8877febb8bd40a5097283d436e3e0851
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
# frozen_string_literal: true # 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
macros4cuke-0.5.17 | spec/macros4cuke/formatter/to-null_spec.rb |