Permalink
Browse files

Add lib/fakeweb.rb so you can also require "fakeweb" instead of "fake…

…_web"
  • Loading branch information...
1 parent 8d51384 commit abad113a3362fb6a3d677b3512fbca30fa01fa73 @chrisk committed Mar 8, 2009
Showing with 9 additions and 2 deletions.
  1. +2 −1 .manifest
  2. +1 −1 fakeweb.gemspec
  3. +2 −0 lib/fakeweb.rb
  4. +4 −0 test/test_fake_web.rb
View
@@ -10,7 +10,8 @@ lib/fake_web/ext/net_http.rb
lib/fake_web/registry.rb
lib/fake_web/responder.rb
lib/fake_web/response.rb
-lib/fake_web/socket_delegator.rb
+lib/fake_web/stub_socket.rb
+lib/fakeweb.rb
test
test/fixtures
test/fixtures/google_response_from_curl
View
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.homepage = "http://github.com/chrisk/fakeweb"
s.has_rdoc = true
s.authors = ["Blaine Cook"]
- s.files = %w(CHANGELOG LICENSE.txt README.rdoc Rakefile lib lib/fake_web lib/fake_web.rb lib/fake_web/ext lib/fake_web/ext/net_http.rb lib/fake_web/registry.rb lib/fake_web/responder.rb lib/fake_web/response.rb lib/fake_web/socket_delegator.rb test test/fixtures test/fixtures/google_response_from_curl test/fixtures/google_response_with_transfer_encoding test/fixtures/google_response_without_transfer_encoding test/fixtures/test_example.txt test/fixtures/test_txt_file test/test_allow_net_connect.rb test/test_fake_web.rb test/test_fake_web_open_uri.rb test/test_helper.rb test/test_query_string.rb)
+ s.files = %w(CHANGELOG LICENSE.txt README.rdoc Rakefile lib lib/fake_web lib/fake_web.rb lib/fake_web/ext lib/fake_web/ext/net_http.rb lib/fake_web/registry.rb lib/fake_web/responder.rb lib/fake_web/response.rb lib/fake_web/stub_socket.rb lib/fakeweb.rb test test/fixtures test/fixtures/google_response_from_curl test/fixtures/google_response_with_transfer_encoding test/fixtures/google_response_without_transfer_encoding test/fixtures/test_example.txt test/fixtures/test_txt_file test/test_allow_net_connect.rb test/test_fake_web.rb test/test_fake_web_open_uri.rb test/test_helper.rb test/test_query_string.rb)
s.test_files = %w(test/fixtures test/fixtures/google_response_from_curl test/fixtures/google_response_with_transfer_encoding test/fixtures/google_response_without_transfer_encoding test/fixtures/test_example.txt test/fixtures/test_txt_file test/test_allow_net_connect.rb test/test_fake_web.rb test/test_fake_web_open_uri.rb test/test_helper.rb test/test_query_string.rb)
s.rdoc_options = ["--main", "README.rdoc"]
s.extra_rdoc_files = ["CHANGELOG", "LICENSE.txt", "README.rdoc"]
View
@@ -0,0 +1,2 @@
+# So you can require "fakeweb" instead of "fake_web"
+require "fake_web"
View
@@ -482,4 +482,8 @@ def test_txt_file_should_have_three_lines
end
assert response.body.split(/\n/).size == 3, "response has #{response.body.split(/\n/).size} lines should have 3"
end
+
+ def test_requiring_fakeweb_instead_of_fake_web
+ require "fakeweb"
+ end
end

0 comments on commit abad113

Please sign in to comment.