From c7de62d88a1569ac63961e8a254f5374803033c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 1 Jan 2011 03:43:30 -0800 Subject: [PATCH] Some browsers automatically adds the charset to Content-Type. Be less restrictive in tests. --- lib/capybara/spec/driver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capybara/spec/driver.rb b/lib/capybara/spec/driver.rb index 9bd3582a..724e9c74 100644 --- a/lib/capybara/spec/driver.rb +++ b/lib/capybara/spec/driver.rb @@ -118,7 +118,7 @@ end shared_examples_for "driver with header support" do it "should make headers available through response_headers" do @driver.visit('/with_simple_html') - @driver.response_headers['Content-Type'].should == 'text/html' + @driver.response_headers['Content-Type'].should =~ /text\/html/ end end