Carlhuda
98f77e0827
Rename named_url_helpers to url_helpers and url_helpers to url_for
2010-02-26 15:04:50 -08:00
Carlhuda
f863045c45
Rename metaclass to singleton_class
2010-02-25 17:56:58 -08:00
Carlhuda
8760add31a
Get URL helpers working again in integration tests.
2010-02-25 17:53:30 -08:00
Carlhuda
226dfc2681
WIP: Remove the global router
2010-02-25 17:53:00 -08:00
Joshua Peek
3eaf525213
Make HEAD method masquerade as GET so requests are routed correctly
2010-01-15 12:38:50 -06:00
Jeremy Kemper
0ff8f81adc
Ruby 1.9: more constant lookup badness :(
2009-11-04 15:00:19 -08:00
Joshua Peek
a5c82a9dfb
Start rewriting some internal tests to use the new routing dsl
2009-10-20 16:03:55 -05:00
George Ogata
3de8b44b26
Make IntegrationTest::Runner propagate method_missing to ancestors.
...
Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-10-15 11:01:42 +13:00
Joshua Peek
84e94551f6
Add custom "with_routing" to internal tests to fix reseting session after using
...
with_routing. This only affects our internal AP tests.
2009-10-03 20:45:49 -05:00
Joshua Peek
acfeec5151
Allow integration test rack app to be set with "@app" ivar instead of using open_session
2009-09-26 20:51:05 -05:00
Joshua Peek
088ce2904d
Fix generic url rewriter in integration tests
2009-09-25 11:10:39 -05:00
Joshua Peek
db0af8075d
Avoid conflict with a "MetalTest" module used in tests
2009-09-19 12:52:52 -05:00
Joshua Peek
ab8aac09d6
Need to reset session in internal integration tests after altering the route set
2009-09-06 22:01:58 -05:00
Jeremy Kemper
4e3fd23e31
test depends on html-scanner
2009-05-23 03:10:48 -07:00
Bryan Helmkamp
0029d5e594
Integrating Rack::MockSession (from Rack::Test)
2009-05-19 22:43:21 -05:00
Pratik Naik
4a6f4b92ad
Change integration test helpers to accept Rack environment instead of just HTTP Headers.
...
Before : get '/path', {}, 'Accept' => 'text/javascript'
After : get '/path', {}, 'HTTP_ACCEPT' => 'text/javascript'
2009-05-19 23:50:03 +02:00
Joshua Peek
9bac470c7a
Group integration test helpers and delegate other helpers to request and response objects
2009-04-30 14:28:42 -05:00
Joshua Peek
6940c0de12
Unify functional and integration tests cookie helpers
2009-04-26 11:37:11 -05:00
Joshua Peek
dd2ed32418
Start to integrate some of the features in Rack::Test.
...
Eventually commit ActionDispatch::Test::MockRequest and ActionDispatch::Test:: UploadedFile upstream.
2009-04-24 20:24:54 -05:00
Joshua Peek
4185a4a5f5
update rack fixture to be ruby 1.9 compat
2009-03-15 23:48:07 -05:00
Joshua Peek
d0e5417861
update rack fixture to be ruby 1.9 compat
2009-03-15 23:25:12 -05:00
Joshua Peek
524d8edf68
Update bundled Rack for Ruby 1.9 spec changes
2009-02-07 16:18:09 -06:00
Jeremy Kemper
278186534c
Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.
2009-02-03 18:40:22 -08:00
Joshua Peek
5b5d0e325d
Use Rack::Head middleware to ensure the body is discarded for HEAD requests
2009-02-01 01:01:49 -06:00
Pratik Naik
c99ef814b0
Revert "HTTP Digest authentication [ #1230 state:resolved]"
...
This reverts commit 45dee3842d68359a189fe7c0729359bd5a905ea4.
Reasons :
1. The code is not working in it's current state
2. Should not be using exceptions for flow control
2009-01-13 16:13:42 +00:00
Joshua Peek
b7ea4add86
Bump Rack version to 0.9
2009-01-06 15:20:57 -06:00
Joshua Peek
45dee3842d
HTTP Digest authentication [ #1230 state:resolved]
2008-12-28 15:13:16 -06:00
Joshua Peek
175cb7a963
Fix metal tests
2008-12-17 10:10:24 -06:00
Jesse Newland
97a178bfa4
Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal:
...
class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "text/plain"}, "Hello World!"]
else
super
end
end
end
might be tested like so:
class PollerTest < ActionController::IntegrationTest
test "poller returns hello world" do
get "/poller"
assert_response 200
assert_response :success
assert_response :ok
assert_equal "Hello World!", response.body
end
end
[#1588 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-17 15:59:47 +01:00
Joshua Peek
ed70830713
Switch to Rack based session stores.
2008-12-15 16:33:31 -06:00
Christos Zisopoulos
69387ce016
Fix for Integration::Session follow_redirect! headers['location'] bug with Rack [ #1555 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-10 18:38:28 -06:00
Joshua Peek
ebec9d43e2
Make integration test runner more Rack friendly and clean out old CGI cruft
2008-12-08 12:33:16 -06:00
Joshua Peek
31ce92f7b5
Use autoload instead of explicit requires for ActionController
2008-11-23 16:35:47 -06:00
Jeremy Kemper
a1eb4e11c2
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Conflicts:
actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Joshua Peek
47cd8b81cc
Switched integration test runner to use Rack processor instead of CGI
2008-08-20 13:37:18 -05:00
Joshua Peek
a74dbe6c52
Improve test coverage for integration tests cookie header
2008-08-20 13:22:36 -05:00
Joshua Peek
6f530de944
Test coverage for integration testing with parameters
2008-08-19 20:15:51 -05:00
Joshua Peek
71c4ff07ab
Delegate xhr helper method to integration session
2008-08-19 18:53:46 -05:00
Joshua Peek
dbb0abfb7e
More integration test coverage
2008-08-17 19:18:18 -05:00
Joshua Peek
40557e17dd
Improved test coverage for integration test's api
2008-06-17 21:25:51 -05:00
Michael Koziarski
1537aec184
use stubbing instead of monkeypatching to stop tests from interfering with one another. Closes #11163 [RubyRedRick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 21:43:13 +00:00
Jeremy Kemper
9d755f1983
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
fa906778ff
Integration tests use ActionController::Dispatcher rather than the old Dispatcher. Closes #10596 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-22 19:03:01 +00:00
David Heinemeier Hansson
0f6c86ff40
Added delete_via_redirect and put_via_redirect to integration testing ( closes #10497 ) [philodespotos]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:39:19 +00:00
David Heinemeier Hansson
436da684dc
Allow headers[Accept] to be set by hand when calling xml_http_request ( closes #10461 ) [BMorearty]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-17 00:10:18 +00:00
Jeremy Kemper
d44ce1cb73
Integration tests: get_ and post_via_redirect take a headers hash. Closes #9130 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-27 20:38:08 +00:00
Jeremy Kemper
0ee1cb2cd3
Ruby 1.9 compat, consistent load paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
46f217b298
Removed deprecated form of calling xml_http_request/xhr without the first argument being the http verb [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 23:00:17 +00:00
Jeremy Kemper
c0c001839c
Take advantage of Mocha support for sequenced returns. Closes #8639 [Josh Peek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-13 00:55:11 +00:00
Jeremy Kemper
d1c957d067
Integration tests: alias xhr to xml_http_request and add a request_method argument instead of always using POST. Closes #7124 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6796 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-21 09:15:16 +00:00