require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'mitamirri' describe "TrackableAction" do describe 'creates a new object from parameters' do before :all do @new = TrackableAction.create_from_params( :session_id => 123456, :referrer => '/', :ip_address => '123.123.123.1', :site => 'www.seologic.com', :kind => 'click', :label => 'Some Random Click', :url => 'http://www.seologic.com/foo/bar/' ) end it 'with a kind' do @new.kind.should == 'click' end it 'with a label' do @new.label.should == 'Some Random Click' end it 'with a referrer' do @new.referrer.should == '/' end it 'with a URL' do @new.url.should == 'http://www.seologic.com/foo/bar/' end it 'with an associated trackable session' do @new.trackable_session_id.should_not be_nil end end end