Skip to content

Commit

Permalink
Begin refactoring Request spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuel committed Jan 15, 2012
1 parent 67b9d97 commit a53b617
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/webmachine/request_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
require 'spec_helper'

describe Webmachine::Request do
subject { Webmachine::Request.new("GET", URI.parse("http://localhost:8080/some/resource"), Webmachine::Headers.new, "") }
subject { request }

let(:uri) { URI.parse("http://localhost:8080/some/resource") }
let(:http_method) { "GET" }
let(:headers) { Webmachine::Headers.new }
let(:body) { "" }
let(:request) { Webmachine::Request.new(http_method, uri, headers, body) }

it "should provide access to the headers via brackets" do
subject.headers['Accept'] = "*/*"
subject["accept"].should == "*/*"
Expand Down

0 comments on commit a53b617

Please sign in to comment.