Displaying 20 results from an estimated 25 matches for "integrationtest".
2007 Nov 13
7
rails story runner returning a nil response code
Has anyone noticed any problems with the Rails story runner returning
a response code of "0" when doing get/post/etc methods? I just
grabbed the latest rails/rspec and just started noticing this problem,
http://pastie.caboo.se/117497
Regular controller specs pass as expected.
--
Josh Knowles
phone: 509-979-1593
email: joshknowles at gmail.com
web: http://joshknowles.com
2009 Oct 06
0
Integrationtest with Subdomain
Hello,
I have a app which uses Subdomains for User-Account "username.my.app"
How can I build an integration test for this app with webrat. i donĀ“t
know how can I use my subdomain logic in the test.
thanks
--
Posted via http://www.ruby-forum.com/.
2008 May 22
2
Story / Redirection to static html within public
...it cannot follow the
redirection (Always gives a 500 error). It does not seem to be able to
access any public/ content within the story.
Within step file of a story this always fails:
''get /index.html''
OR
visits ''/index.html''
I looked back at ActionController::IntegrationTest which seems to be
where RailsStory gets all its magic from. That lead me to believe that
perhaps this was a rails issue?
So I''m unsure if:
1. Accessing public/ within a story is just not supposed to be possible.
2. Accessing public/ within ActionController::IntegrationTest is not
suppose...
2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi
I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just
like the example in the post
http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released
However, trying it in irb gets me the following error:
>> require ''mocha''
=> true
>> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007''))
NoMethodError:
2006 Jul 31
1
How do I call a controller from a model, console, or outside of rails?
...an to use backgroundrb, and I need to be able to capture the output of
"pages.browse()" where pages is my controller. I need to pass in the id
param.
How can I do this besides using Net::HTTP? Using Net::HTTP hangs when
I''m testing using webrick.
I see that Actioncontroller::IntegrationTest can do this, but I have no
idea of how to call that from a development/production environment.
Thanks,
Jason
2006 Apr 04
1
integration tests - 1.1
I?m using the new 1.1 integration test facility? I?m trying to write a
test that sees if a controller redirects to the correct place and
preserves the query string.
Here?s the code:
class LoginRedirectTest < ActionController::IntegrationTest
def test_non_admin_auth
request_uri = "/datafeed/event/report?blah=blah"
get(request_uri)
follow_redirect!
assert_response :success
status = post("/login/authenticate", :login_info => {:user_name =>
"blah", :password => "blah...
2006 Apr 07
2
Functional testing Pretty Urls
Anyone know how to how to test pretty urls (set through routes.rb)? I want
to don''t use get :action, because the routing changes how a certain action
is requested. How does one go about testing this?
Thanks,
Tim Case
tim@karmacrash.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Sep 29
0
Living Dangerously?
how can I get the benefits of integration testing with Rspec on Rails
REL_0_6_3, please?
When I first started playing with Rspec on Rails, I hacked
spec_helper.rb to include the IntegrationTest interface (diff below) as
it was the minimum change I could make to get the the ability to run
multiple actions across controllers in my spec. I use it to specify
authenticated sessions and stuff. No, I didn''t know what I was doing,
but it seemed to work.
Today it bit me. I most-al...
2006 Sep 29
0
Still living dangerously
5 seconds after my last post, I twigged why a call to
FeedbackController.new would return an AccountController - the
IntegrationTest must intercept the call and sure enough it does:
action_controller/integration,rb: 315-339 and rdebug shows that this is
indeed the cause.
I still don''t see how the intercept is established - I can''t see where
the call to extend ActionController::Base occurs *except* in
Inte...
2006 Aug 07
0
integration test won''t run
Im trying to write and run integration tests in my app, but they keep
failing with an error like "uninitialized constant IntegrationTest"
secificly:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/
active_support/dependencies.rb:123:in `const_missing'': uninitialized
constant IntegrationTest (NameError)
I tried creating a fresh rails app and was able to run an integration
test from there. I also tried...
2006 May 04
6
second assert_tag failling in rails integration test
...class TestController < ApplicationController
def one
render_text(''one'')
end
def two
render_text(''two'')
end
end
3) create an integration test:
require "#{File.dirname(__FILE__)}/../test_helper"
class MyTest < ActionController::IntegrationTest
def test_one
post(''/test/one'')
assert_tag(:content => /one/)
post(''/test/two'')
assert_match(/two/, @response.body)
assert_tag(:content => /two/)
end
end
4) ran the integration test.
So, I expected the assertions to all pass, but...
2007 Jan 09
1
assert_redirected_to not working as expected
...ion => ''welcome'')
else
flash[:notice] = "Signup unsuccessful!"
end
end
end
===
The "success" integration test
(test/integration/authentication_test.rb) looks like this (snipped):
===
class AuthenticationTest < ActionController::IntegrationTest
def setup
User.create(:login => "goober",
:email => "goober-I/zrSzmPSO5BDgjK7y7TUQ@public.gmane.org",
:password => "gomer",
:password_confirmation => "gomer")
end
...
def test_successfu...
2007 Dec 24
1
Uninitialized constant in integration test
...#39;'application'' and ''listings_controller'', but
neither solves this problem, although the exception changes.
Anybody know what''s going on here?
Thanks.
----
require "#{File.dirname(__FILE__)}/../test_helper"
class FooTest < ActionController::IntegrationTest
def test_redirect
get "/"
assert_redirected_to "/"
end
end
----
with this exception:
NameError: uninitialized constant ApplicationController
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:266:in
`load_missing_constant...
2008 Jun 07
2
Rails integration tests without stories
...easantly_long_and_cumbersome. I haven''t
yet looked at the test/unit interop support, but maybe that would be
helpful here?
I tried to make an IntegrationExampleGroup akin to the other rails
example groups:
module Spec::Rails::Example
class IntegrationExampleGroup < ActionController::IntegrationTest
Spec::Example::ExampleGroupFactory.register(:integration, self)
end
end
describe ''GET /widgets'', :type => :integration do
it "should ..." do
get ''/widgets''
[...]
end
end
This roughly seems to work for the integration tests (I'&...
2006 May 13
0
integration: assert_template() always fails...
Hi Coders :-)
Maybe somebody can help...
My integration tests always fail when using assert_template()
class ShopTest < ActionController::IntegrationTest
def test_very_simple
get("/shop/index")
assert_success
assert_template("/shop/index")
end
end
the "/shop/index" is a valid url which renders flawlessly in the browser. however, the test will produce:
1) Failure:
test_buy_an_article(ShopTest)...
2006 Oct 02
3
RSpec 0.6.4 released
We''ve released RSpec 0.6.4. Check it out! Check it out!
Release info:
http://rubyforge.org/frs/shownotes.php?release_id=7178
General info:
http://rspec.rubyforge.org/
Questions? Right here!
Enjoy,
David
2006 Dec 31
0
Problem with Integration Test
I am trying to setup an integration test and I keep getting the
following error:
ruby test/integration/portfolios_test.rb
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing'': uninitialized constant IntegrationTest (NameError)
from test/integration/portfolios_test.rb:3
Empty code shell for the integration test:
portfolios_test.rb:
require File.dirname(__FILE__) + ''/../test_helper''
class PortfolioTest < ActionController::IntegrationTestSession
end
Any ideas? I am using the syn...
2007 Oct 15
0
Fwd: Content filtered message notification
...AuthenticatedSystem module, in the
lib/authenticated_system.rb
What happen is that the stub have no effect and the real method is still
executed.
Here is the code. Any idea ?
Thank you
require "#{File.dirname(__FILE__)}/../test_helper"
class CheckStopsiteTest < ActionController::IntegrationTest
fixtures :users
def test_closed_site
AuthenticatedSystem.stubs(:login_required).returns(true)
get ''/admin/maintenance/stop_site''
assert_response :success
get ''/fr/site''
assert_redirected_to :controller => ''site'', :act...
2007 Jan 26
0
Problems with assert_select in integration tests
...ct, it has the exact text of what I''m trying to match.
Here is the complete integration test. The failure occures on the
first assert_select in the second call to click_button.
require "#{File.dirname(__FILE__)}/../test_helper"
class AccountCreationTest < ActionController::IntegrationTest
def test_personal_account_creation
goto_home_page
click_link "Create Account", "/account/new_account_step_one"
click_button "Next Step", "/account/new_account_step_one",
:user=>{:username=>"TestUser",
:password=>'...
2008 Jan 16
1
session data and user stories
hello there,
i have been trying my hand at this rbehave material, specifically in terms
of integration testing a rails application, and i am curious about the most
friendly way to deal with session data.
currently, the only way i have found to simulate a session is to open a
session and refer to everything afterward via the @session variable stored
after open_session. it seems to be workable,