Sha256: 32181a3efb69e820c52e72de4d3ac2c4c0da3cd9be61f579a5e0df71efdcd954
Contents?: true
Size: 888 Bytes
Versions: 1
Compression:
Stored size: 888 Bytes
Contents
require 'spec_helper' describe Response::Redirect::Found, '#build' do subject { object.build(location) } let(:object) { described_class } let(:location) { double('Location', to_s: 'THE-LOCATION') } its(:status) { should be(Response::Status::FOUND) } its(:headers) { should eql('Location' => location, 'Content-Type' => 'text/plain; charset=UTF-8') } its(:body) { should eql('You are beeing redirected to: THE-LOCATION') } end describe Response::Redirect::Permanent, '#build' do subject { object.build(location) } let(:object) { described_class } let(:location) { double('Location', to_s: 'THE-LOCATION') } its(:status) { should be(Response::Status::MOVED_PERMANENTLY) } its(:headers) { should eql('Location' => location, 'Content-Type' => 'text/plain; charset=UTF-8') } its(:body) { should eql('You are beeing redirected to: THE-LOCATION') } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
response-0.0.5 | spec/unit/response/redirect/class_methods/build_spec.rb |