Sha256: c9571b84845270327585adbbdfe81ae2edb775106128d74fa4042df31dc2dd64
Contents?: true
Size: 961 Bytes
Versions: 2
Compression:
Stored size: 961 Bytes
Contents
class UserFixture @namespace_uri = "http://v1_0.ws.user.example.com" @soap_actions = { :find_user => "findUser" } @datetime_string = "2010-11-22T11:22:33" @datetime_object = DateTime.parse @datetime_string @response_hash = { :id => "666", :active => true, :username => "thedude", :firstname => "The", :lastname => "Dude", :email => "thedude@example.com", :registered => @datetime_object } class << self attr_accessor :namespace_uri, :soap_actions, :datetime_string, :datetime_object, :response_hash def user_wsdl load_fixture :user_wsdl end def user_response load_fixture :user_response end def multiple_user_response load_fixture :multiple_user_response end def soap_fault load_fixture :soap_fault end private def load_fixture(file) file_path = File.join File.dirname(__FILE__), "#{file}.xml" IO.readlines(file_path, "").to_s end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
savon-0.5.1 | spec/fixtures/user_fixture.rb |
savon-0.5.0 | spec/fixtures/user_fixture.rb |