Sha256: c6520ae7f701b7272ba2a8789c35566351db30a60ee8b47d8ff8f0cff47024d5

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe "Standard Library" do
  describe "list?" do
    before :each do
      @interpreter = Flea::Interpreter.new
    end
    
    it "should should return true for an empty list" do
      result = @interpreter.run("(list? '())")
      result.should == true
    end
    
    it "return true for a populated list" do
      result = @interpreter.run("(list? '(a b c))")
      result.should == true
    end
    
    it "should return false for an atom" do
      result = @interpreter.run("(list? 'a)")
      result.should == false
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flea-0.1.0 spec/flea/standard_library/list_predicate_spec.rb