Sha256: f2749c83d14bbee566ffbeb8c56d8a2405e5246bcae61d50a6bfe728fd307fe2
Contents?: true
Size: 596 Bytes
Versions: 1
Compression:
Stored size: 596 Bytes
Contents
require 'spec_helper' module Sexpr describe Parser, "input_text" do include Parser it 'recognizes a string' do input_text("Hello world").should eq("Hello world") end it 'accepts a path' do input_text(Path.file).should eq(File.read(__FILE__)) end it 'accepts an IO' do File.open(__FILE__, 'r') do |io| input_text(io).should eq(File.read(__FILE__)) end end it 'raises a InvalidParseSourceError when invalid source' do lambda{ input_text(self) }.should raise_error(InvalidParseSourceError) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sexpr-1.1.0 | spec/unit/parser/test_input_text.rb |