Sha256: 773ad6221df431a19cec8e1a29f8d72e3b950d78e784b14f6ba85997ebc15a96

Contents?: true

Size: 1000 Bytes

Versions: 2

Compression:

Stored size: 1000 Bytes

Contents

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

describe Eotb do
  
  before(:each) do
    @response = "200"
    Eotb.configure("0"*24)
  end
  
  it "should register two arguments" do
    Eotb.register_event("actor", "action").code.should == @response
  end
  
  it "should register three arguments" do
    Eotb.register_event("actor", "action", {:username => "John"}).code.should == @response
  end
  
  it "should register symbols" do
    Eotb.register_event(:actor, :action, {:username => "John"}).code.should == @response
  end
  
  it "should register objects" do
     Eotb.register_event(Object.new, :action, {:username => Object.new}).code.should == @response
  end

  it "should register hashes" do
     Eotb.register_event({:type => "User"}, :action, {:username => {:first_name => "John"}}).code.should == @response
  end
  
  it "should register arrays" do
     Eotb.register_event([2,3,4], :action, {:username => ["John", "Josh"]}).code.should == @response
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eotb-0.4.1 spec/eotb_spec.rb
eotb-0.4.0 spec/eotb_spec.rb