Skip to content

Instantly share code, notes, and snippets.

@ericchen
Created May 12, 2011 01:10
Show Gist options
  • Save ericchen/967739 to your computer and use it in GitHub Desktop.
Save ericchen/967739 to your computer and use it in GitHub Desktop.
Test callback methods in Rails
it "should sending command after record created" do
@cmd_pool = CommandPool.new
@cmd_pool.valid?.should == true
@cmd_pool.should_receive(:send_udp_command)
@cmd_pool.run_callbacks(:create)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment