Sha256: e42abd4fae194a78105d8085da865bcf3f65689780e586c1e62bd1bae55fdbcb
Contents?: true
Size: 847 Bytes
Versions: 12
Compression:
Stored size: 847 Bytes
Contents
require 'spec_helper' describe "Http basics" do with_prepare_params inject environment: :environment, conveyors: :conveyors isolate :conveyors before do rad.conveyors.web do |web| web.use Rad::Http::Processors::HttpWriter web.use Rad::Http::Processors::PrepareParams web.use Rad::Http::Processors::EvaluateFormat end end it "http call" do workspace = nil rad.http.call rad.http.mock_environment do |c| c.call workspace = rad.workspace end # .should == [200, {"Content-Type" => "text/html"}, ""] workspace.delete(:env).should be_a(Hash) expected_result = {path: "/", response: [200, {"Content-Type" => "text/html"}, ""], params: {format: 'html'}} workspace.to_h.subset(expected_result.keys).should == expected_result end end
Version data entries
12 entries across 12 versions & 1 rubygems