Sha256: 62bac12d30926bd2d1090905707b58c858f8db82025ff1fe3a030f9869d98f3c

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

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

CLIENT = File.dirname(__FILE__) + "/sample_client.rb"

describe PetiteLettre do
  def response_for(hash)
    PetiteLettre.call("ruby #{CLIENT}",hash)
  end
  
  it "allows to send a simple message and get an answer" do
    response_for({ :a => 5, :b => 2.0 }).should == 5/2.0
  end

  it "understands errors" do
    lambda { response_for({ :a => 5, :b => 0}) }.should raise_error("divided by 0")
  end
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
thbar-petite-lettre-1.0.0 spec/petite_lettre_spec.rb
petite-lettre-1.0.0 spec/petite_lettre_spec.rb