Sha256: 2d273d23b8c3c6e6458c43a3d7f240c44e7fb486926269278e820805ccb78762

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

require "spec_helper"

describe BestBoy::Eventable do
  before(:each) do
    @user = User.create
  end

  it "should send valid create event" do
    best_boy_event = @user.best_boy_events.first.should_not be_nil
  end

  it "should send valid destroy event" do
    @user.destroy
    BestBoyEvent.where(:owner_type => "User", :event => "destroy").should_not be_nil
  end

  it "should be an eventable" do
    @user.respond_to?("eventable?").should eql(true)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
best_boy-0.0.3 spec/best_boy/eventable_spec.rb