Sha256: 5ff51dc26abc68c812f9e853075f501cc8ad98c0629c24f2a15ef085b3a59b3f

Contents?: true

Size: 1004 Bytes

Versions: 6

Compression:

Stored size: 1004 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'orange-core'
require 'rubygems'

require 'mock/mock_app'
require 'mock/mock_pulp'
require 'mock/mock_core'
require 'mock/mock_carton'
require 'mock/mock_model_resource'
require 'mock/mock_mixins'
require 'mock/mock_router'
require 'mock/mock_resource'
require 'mock/mock_middleware'
require 'rack/test'


Spec::Runner.configure do |config|
  config.include(Rack::Test::Methods)
end

def mock_post
  p= mock("request", :null_object => true)
  p.stub!(:post?).and_return(true)
  p.stub!(:params).and_return({})
  p
end

def mock_delete
  p= mock("request", :null_object => true)
  p.stub!(:delete?).and_return(true)
  p.stub!(:params).and_return({})
  p
end

def empty_packet(c = Orange::Core.new)
  Orange::Packet.new(c, {})
end

def packet_finish_app
  lambda { |env|
    Orange::Packet.new(env).finish
  }
end

def return_env_app
  lambda { |env|
    [env, 200, ["ok"]]
  }
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
orange-0.1.7 spec/orange-core/spec_helper.rb
orange-0.1.4 spec/orange-core/spec_helper.rb
orange-0.1.2 spec/orange-core/spec_helper.rb
orange-0.1.0 spec/orange-core/spec_helper.rb
orange-0.0.15 spec/orange-core/spec_helper.rb
orange-0.0.14 spec/orange-core/spec_helper.rb