Sha256: 5c2eb940e2a62254fb6de23dffd49c2b68b84050a29cea6ebbbbc4c339bab6de

Contents?: true

Size: 721 Bytes

Versions: 3

Compression:

Stored size: 721 Bytes

Contents

require 'spec_helper'
require 'bioinform/parsers/parser'

module Bioinform
  describe TrivialParser do
    context '#initialize' do
      it 'should take the only input argument' do
        TrivialParser.instance_method(:initialize).arity.should == 1
      end
    end
    context '#parser!' do
      it 'should return input of that was passed to initialize' do
        TrivialParser.new('stub input').parse!.should == 'stub input'
      end
    end
    it 'can be used to create PM with {matrix: ..., name: ...} form' do
      pm = PM.new({matrix: [[1,2,3,4],[5,6,7,8]], name: 'Name'}, TrivialParser)
      pm.matrix.should == [[1,2,3,4],[5,6,7,8]]
      pm.name.should == 'Name'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bioinform-0.1.7 spec/parsers/trivial_parser_spec.rb
bioinform-0.1.6 spec/parsers/trivial_parser_spec.rb
bioinform-0.1.5 spec/parsers/trivial_parser_spec.rb