Sha256: 67def4e99bf2e2dd35585dde9e542a2f1c0ce99f519f689c8ea04ea38c0e77d5
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubygems' require 'orange-core' 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 'mock/mock_plugin' require 'rack/test' require 'dm-sqlite-adapter' DataMapper.setup(:default, "sqlite::memory:") 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
orange-core-0.7.1 | spec/orange-core/spec_helper.rb |
orange-core-0.7.0 | spec/orange-core/spec_helper.rb |