Displaying 9 results from an estimated 9 matches for "response_code".
2007 Dec 13
1
Merb::RenderMixin#set_status refers to non-existent RESPONSE_CODES constant
#set_status
http://merb.devjavu.com/browser/trunk/lib/merb/mixins/render.rb#L270
refers to a non-existent constant. I tried, while creating #359, to
make things OK, but I failed. I started by using STATUS_CODES instead,
then used #[] instead of calling a method named STATUS_CODES, then I
found out that during the call to #inherited
2007 Dec 01
5
specifying an HTTP status code
Hi all,
I''m just starting to work w/ RSpec, so I hope this question isn''t too
obvious or missing the point somehow: Is there a way in RSpec to
specify that a controller action should use a specific HTTP status
code? Specifically I want to test for the usage of 301 as opposed to
302, for a permanent redirection.
response.should be_redirect
looks like it calls
2008 Feb 13
5
Example controller spec no worky?
...9;broken''
end
# passes
it "should not assign an event" do
assigns[:event].should == nil
end
# fails - expected 404 but got events/show
it "should render 404" do
response.should render_template("#{RAILS_ROOT}/public/404.html")
response.response_code.should == 404
end
#end spec
Because I''m stubbing find does that mean the RecordNotFound exception
doesn''t happen and thus the 404 doesn''t render? I tried stubbing and
using should_raise, and_raise, whatever the heck it is, but I just don''t
get it, nothing se...
2007 Feb 07
15
https with certificates
I poked around the web a little and didn''t run across how to use https
when it asks for certificate validation.
I''m trying to connect to devices that don''t have valid certificates,
and in this case, I don''t care if they are or not.
So when I use my browser to ge to the site, firefox asks me to allow
the certificate, then one other question, then I get the
2015 Apr 11
0
Check feed connected, active - IceCast 2.4.x
...ript to monitor
> my IceCast server to make sure IceCast is up and running, and the feeds
> connected... obviously not a verification of audio, yet, but at least the
> source is sending data to the IceCast server.
>
> I can check that IceCast is running doing a simple:
>
> response_code = urllib.urlopen("http:/server:8000").getcode()
Two slashes missing.
> If I get a 200, IceCast is up/running.
>
> For feeds what would be the best URL to check and the response?
>
> NOTE: Feeds if THE SOURCE is NOT SENDING, FAIL OVER to a fail over
> mount!!
>...
2013 Oct 09
0
getting selenium working with jruby/sinatra/cucumber/webrat on windows
...e = :rack
config.mode = :selenium
config.application_port = 4567
config.application_framework = :sinatra
end
class WebratMixinExample
include Rack::Test::Methods
include Webrat::Methods
include Webrat::Matchers
Webrat::Methods.delegate_to_session :response_code, :response_body
def app
# Sinatra::Application
Main
end
end
World{WebratMixinExample.new}
====================================
> When I run cucumber I get
>unrecognized argument &:
Usage: java -jar selenium-server.jar [-interactive] [opt...
2006 Dec 07
2
Problem saving parent and children using belongs_to, class_name, and foreign_key
Hi, I have a real simple association setup here that''s just trying to:
- Create a new PayjunctionOrder
- Create some LineItem objects and assign them to the PayjunctionOrder
- Save everything
I''m using Rails Edge.
----
class PayjunctionOrder < ActiveRecord::Base
has_many :line_items
end
------------------
----
class LineItem < ActiveRecord::Base
belongs_to :order,
2011 Sep 07
3
Method get of ActionController::TestCase ignores routes.rb?
...ue which seems to indicate that
ActionController::TestCase.get() method ignores what I have in routes.rb.
Happens in 3.0.10 and 3.1.0 too.
I have the following RSpec2 test of my XmlRpcController#index action:
it "should get nothing in response to GET request" do
get :index
response.response_code.should == 400 #bad_request
end
And the only line related to this route in routes.rb is:
post ''rpc'', :to => "xml_rpc#index"
''rake routes'' also shows only this route defined.
As a result when I run this test that action actually DOES get executed!...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply
to this email, as some of the replaced lines are too long, so git
won't let me send the email. However, there is nothing wrong with
that patch, and it should be applied in the sequence listed below.
Note also that I assume this will be tested on a clean f11 install, rather
than an upgrade of an existing ovirt server