This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "Faking it with Savon" do | |
before do | |
Savon.hooks.define "Fake Response", :soap_request do | |
HTTPI::Response.new(200, {}, "<Envelope><Body><response>Success!</response></Body></Envelope>") | |
end | |
after do | |
Savon.hooks.reject! "Fake Response" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.views.creditCardForm.items.items[0].up('form').insert(1, { | |
xtype: 'fieldset', | |
id: 'customerInfoFormFieldset', | |
title: 'Name and Address Details', | |
instructions: 'Please enter your name and address.', | |
defaults: { | |
xtype: 'textfield', | |
labelAlign: 'left', | |
labelWidth: '40%', | |
required: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save_with_lock | |
r = Record.first | |
# This will raise PG::LockNotAvailable if already locked | |
# | |
r.with_lock("FOR UPDATE NOWAIT") do | |
# do stuff | |
end | |
# This rescue block isn't executed for some reason?? |
OlderNewer