Sha256: cff867d1c04af330124b95e602c99863d64b934416e0b877d91b5397751a8fde

Contents?: true

Size: 1.05 KB

Versions: 41

Compression:

Stored size: 1.05 KB

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.stub!(:xhr?).and_return(false)
  p
end

def mock_delete
  p= mock("request", :null_object => true)
  p.stub!(:delete?).and_return(true)
  p.stub!(:params).and_return({})
  p.stub!(:xhr?).and_return(false)
  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

41 entries across 41 versions & 3 rubygems

Version Path
orange-more-0.7.3 spec/orange-core/spec_helper.rb
orange-more-0.7.2 spec/orange-core/spec_helper.rb
orange-more-0.7.1 spec/orange-core/spec_helper.rb
orange-more-0.6.5 spec/orange-core/spec_helper.rb
orange-more-0.6.4 spec/orange-core/spec_helper.rb
orange-more-0.6.3 spec/orange-core/spec_helper.rb
orange-more-0.6.2 spec/orange-core/spec_helper.rb
orange-more-0.6.0 spec/orange-core/spec_helper.rb
orange-0.5.8 spec/spec_helper.rb
orange-more-0.5.8 spec/orange-core/spec_helper.rb
orange-core-0.5.8 spec/orange-core/spec_helper.rb
orange-0.5.7 spec/spec_helper.rb
orange-more-0.5.7 spec/orange-core/spec_helper.rb
orange-core-0.5.5 spec/orange-core/spec_helper.rb
orange-core-0.5.3 spec/orange-core/spec_helper.rb
orange-0.5.5 spec/orange-core/spec_helper.rb
orange-0.5.4 spec/orange-core/spec_helper.rb
orange-0.5.3 spec/orange-core/spec_helper.rb
orange-0.5.2 spec/orange-core/spec_helper.rb
orange-0.5.1 spec/orange-core/spec_helper.rb