Sha256: fd1aa1ff1939539cc7e570a9c11b8d12e7df6360bc910aa1f71b6d7cab8a4a28
Contents?: true
Size: 677 Bytes
Versions: 1
Compression:
Stored size: 677 Bytes
Contents
require 'spec_helper' describe Yaps::Publisher do describe 'messages' do it "it should fired a message after create" do user = User.new(:name => 'John') expect(user).to receive(:publish).once.with(:user_created, user) user.save end it "it should fired a message after update" do user = User.create(:name => 'John') user.name = 'Jack' expect(user).to receive(:publish).once.with(:user_updated, user) user.save end it "it should fired a message after update" do user = User.create(:name => 'John') expect(user).to receive(:publish).once.with(:user_deleted, user) user.destroy end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yaps-0.0.1 | spec/publisher_spec.rb |