Sha256: ef755d4f759d10645ed6d05690e43eb5571ebc1738e05bd1090bf9027836b4d3

Contents?: true

Size: 871 Bytes

Versions: 8

Compression:

Stored size: 871 Bytes

Contents

require_relative '../spec_helper'

# Load the class under test
require_relative '../../lib/sequitur/digram'

module Sequitur # Re-open the module to get rid of qualified names

describe Digram do
  let(:two_symbols) { [:b, :c] }

  context 'Standard creation & initialization:' do
  
    it 'should be created with 3 arguments' do
      production = double('sample-production')
      instance = Digram.new(:b, :c, production)
      
      expect(instance.symbols).to eq(two_symbols)
      expect(instance.production_id).to eq(production.object_id)
    end
    
    it 'should return the production that it refers to' do
      production = double('sample-production')
      instance = Digram.new(:b, :c, production)
      expect(instance.production).to eq(production)
    end

  end # context 

end # describe

end # module

# End of file

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sequitur-0.0.11 spec/sequitur/digram_spec.rb
sequitur-0.0.10 spec/sequitur/digram_spec.rb
sequitur-0.0.09 spec/sequitur/digram_spec.rb
sequitur-0.0.08 spec/sequitur/digram_spec.rb
sequitur-0.0.07 spec/sequitur/digram_spec.rb
sequitur-0.0.06 spec/sequitur/digram_spec.rb
sequitur-0.0.05 spec/sequitur/digram_spec.rb
sequitur-0.0.04 spec/sequitur/digram_spec.rb