Sha256: b513f7d24f988cc39afcd01ba2bb110d9a7d4675ab2807ec2b0784856532e417

Contents?: true

Size: 638 Bytes

Versions: 2

Compression:

Stored size: 638 Bytes

Contents

require 'spec_helper'
module Alf
  describe Reader do
    
    subject{ Reader }
    it { should respond_to(:rash) }
      
    describe "rash" do
      subject{ Reader.rash($stdin) }
      it{ should be_a(Reader::Rash) }
    end
    
    describe "reader" do
      
      specify "when associated" do
        r = Reader.reader('suppliers.rash')
        r.should  be_a(Reader::Rash)
      end
      
      specify "when not associated" do
        lambda{ Reader.reader('.noone') }.should raise_error
      end
      
      specify "when an IO" do
        Reader.reader($stdin).should be_a(Reader::Rash)
      end
      
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-0.9.2 spec/unit/test_reader.rb
alf-0.9.1 spec/unit/test_reader.rb