Sha256: 0305bdad99c5dd898fe4db35978c77571cf82eb7fa72738554543755d77ee146

Contents?: true

Size: 810 Bytes

Versions: 4

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

require_relative '../spec_helper' # Use the RSpec framework

# Load the class under test
require_relative '../../lib/mini_kraken/core/nullary_relation'


module MiniKraken
  module Core
    describe NullaryRelation do
      subject { NullaryRelation.new('fail') }

      context 'Initialization:' do
        it 'should be initialized with a name' do
          expect { NullaryRelation.new('fail') }.not_to raise_error
        end

        it 'should know its name' do
          expect(subject.name).to eq('fail')
        end

        it 'should know its zero arity' do
          expect(subject.arity).to be_nullary
        end

        it 'should be frozen' do
          expect(subject).to be_frozen
        end
      end # context
    end # describe
  end # module
end # module

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mini_kraken-0.3.03 spec/core/nullary_relation_spec.rb
mini_kraken-0.3.02 spec/core/nullary_relation_spec.rb
mini_kraken-0.3.01 spec/core/nullary_relation_spec.rb
mini_kraken-0.3.00 spec/core/nullary_relation_spec.rb