Sha256: 14ae7d6f6fd3d95c9e7aa90dcc17ea8c879842b1c59c96d1912c12931007b408

Contents?: true

Size: 1.14 KB

Versions: 12

Compression:

Stored size: 1.14 KB

Contents

# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require "rails/test_help"
require "rspec/rails"

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  # Remove this line if you don't want RSpec's should and should_not
  # methods or matchers
  require 'rspec/expectations'
  config.include RSpec::Matchers

  # == Mock Framework
  config.mock_with :rspec
end

require 'savon'

Savon.configure do |config|
  config.log = false            # disable logging
end

HTTPI.logger = Logger.new(open("/dev/null", 'w'))
HTTPI.adapter = :rack

HTTPI::Adapters::Rack.mount 'app', Dummy::Application

Dummy::Application.routes.draw do
  wash_out :api
end

def savon_instance
  Savon::Client.new do
    wsdl.document = 'http://app/api/wsdl'
  end
end

def mock_controller(&block)
  Object.send :remove_const, :ApiController if defined?(ApiController)
  Object.send :const_set, :ApiController, Class.new(ApplicationController) {
    include WashOut::SOAP

    class_exec &block if block
  }
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wash_out-0.3.6 spec/spec_helper.rb
wash_out-0.3.5 spec/spec_helper.rb
wash_out-0.3.4 spec/spec_helper.rb
wash_out-0.3.3 spec/spec_helper.rb
wash_out-0.3.2 spec/spec_helper.rb
wash_out-0.3.1 spec/spec_helper.rb
wash_out-0.3.0 spec/spec_helper.rb
wash_out-0.2.6 spec/spec_helper.rb
wash_out-0.2.5 spec/spec_helper.rb
wash_out-0.2.4 spec/spec_helper.rb
wash_out-0.2.3 spec/spec_helper.rb
wash_out-0.2.2 spec/spec_helper.rb