similar to: ridding away with do_request

Displaying 20 results from an estimated 500 matches similar to: "ridding away with do_request"

2006 Dec 24
6
What do you think of this controller spec?
Here''s a controller spec I wrote, it''s for a very simple RESTful controller (well, aren''t all RESTful controllers simple? :) I''ve created a couple spec helper methods to refactor some of the common code...for example, require_login_and_correct_user creates two specifications: one for when the user isn''t logged in, and one when the user is logged in but
2008 Jan 07
3
Strange Problem with dm-0
I began an update of one of our servers via yum and, coincidentally or not, I have been getting the following logged into the message file since: messages:Jan 7 15:55:51 inet07 kernel: post_create: setxattr failed, rc=28 (dev=dm-0 ino=280175) Now, this tells me that dev dm-0 is out of space but, what is dm-0? So, can anyone tell me what is happening and why? -- *** E-Mail is
2007 Aug 17
11
[rspec] looking for a simple refresher
I''ve been off the rspec for a few months and I''m trying to get back on it. 1) Spec::Mocks::MockExpectationError in ''TicketsController handling POST /tickets should create a new ticket'' Mock ''Ticket_1001'' expected :new with ({}) once, but received it 0 times ./spec/controllers/tickets_controller_spec.rb:16: script/spec:4: class
2011 May 25
1
warning: toplevel constant SomeController referenced by Admin::SomeController
This issue has been discussed before (http://www.ruby-forum.com/topic/ 125392) and after spending a while debugging through this, I still don''t have a solution. Lets try again? I have two controllers, SomeController and Admin::SomeController. When SomeController is loaded first (which happens under spork, found out by editing ActiveSupport::AbstractController) I get warning: toplevel
2007 Jul 12
3
Agh, this is annoying. Why is this happening?
My problem: Mock ''Task_1005'' received unexpected message :user_id= with (1) No matter what I do to try to stub that out it will still fail out and give me that message. Here is my spec describe TasksController, "handling POST /tasks" do before(:each) do @task = mock_model(Task, :to_param => "1", :save => true)
2009 Apr 24
4
Undefined method "redirect_to" in before_filter
Code sample: class SomeController < ApplicationController before_filter do |c| add_crumb "Blah", "/blah" #breadcrumbs plugin redirect_to :controller => "foo", :action => "bar" unless c.send (:has_package?) end # Rest of the controller... private def has_package? # A bunch of logic work to check to make sure # somebody''s session contains
2007 Aug 21
2
using restful_authentication current_user inside controller specs
I''m using restful_authentication in my app and I have the before filters in my application rhtml: before_filter :login_required around_filter :set_timezone around_filter :catch_errors Currently I have them commented out while rspec''in but I''ll need to add them in my specs. def create @ticket = Ticket.new(params[:ticket]) @ticket.user = current_user if
2007 Oct 26
2
Examples of writing controller specs that use authentication
Hello, I''m working on specs for a controller that handles authentication using the restful_authentication plugin. I''m trying to find a resource (tutorial or examples, if possible) about the best way to go about writing mocks and specs to make sure that things like my before_filters are working correctly. Does anyone know of any good resources for this? Thanks, Les
2007 Nov 21
6
How thorough do you test?
Testing models is great and would not be able to create anything without it, but I am finding testing the controllers and views is a pain. Rest based controllers don''t seem to change that much when compared to the auto-generated code that obviously works. As for views I fail to see why testing it with a mock model does anything. Nothing is ensuring that when changes are made to the
2006 Apr 22
3
Creating a select dropdown box with links to methods
What would be the best way to create a form select dropdown box and upon "submit" have it directly go to a controller method view? I have something that somewhat works, but I think there is probably a much easier way to do it. As of now, I have the dropdown list which when the form is submitted is handed to a controller method which basically I have my dropdown box: <%=
2015 Sep 25
3
FreeBSD backed with a PR1500LCDRT2U
> >> usbconfig -u 4 -a 2 dump_curr_config_desc > > Here is output of the command. Thank you for your help with this. > > ugen4.2: <product 0x0601 CyberPower Systems> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (50mA) > [...] > bLength = 0x09 > bDescriptorType = 0x21 > bDescriptorSubType = 0x10 >> RAW dump: >> 0x00 | 0x09, 0x21,
2015 Sep 24
2
FreeBSD backed with a PR1500LCDRT2U
>> >> The output was also not as big as you made it out to be. > > Well, I didn't expect the driver to fail *that* badly :-) > > Assuming the UPS is still at /dev/ugen4.2, can you try the following command? (Probably needs to be run as root, with the driver stopped.) > > usbconfig -u 4 -a 2 dump_curr_config_desc Here is output of the command. Thank you for
2019 Oct 10
1
[PATCH NOT WORKING nbdkit] vddk: Restructure plugin to allow greater parallelism.
We had a query yesterday about the VDDK plugin and making it actually obey the weird "Multithreading Considerations" rules in the VDDK documentation (https://vdc-download.vmware.com/vmwb-repository/dcr-public/8f96698a-0e7b-4d67-bb6c-d18a1d101540/ef536a47-27cd-481a-90ef-76b38e75353c/vsphere-vddk-671-programming-guide.pdf) This patch is my attempt to implement this. The idea is that the
2007 Nov 23
12
namespaced controllers
Out of curiosity, I''ve seen the following fail: module Admin describe MyController ... end end But this works fine: describe Admin::MyController .. end Why? Scott
2015 Aug 18
2
Need help with Tripp Lite SMART1300LCDT NUT v2.7.3
Here are all the usbconfig outputs you have requested. I have left a message with the Dev for NAS4Free to give up the ./configure for NUT portion.? I am hoping they will... usbconfig -u 0 -a 5 dump_device_desc? datanas: ~# usbconfig -u 0 -a 5 dump_device_desc ugen0.5: <TRIPP LITE UPS Tripp Lite> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)? bLength = 0x0012 ? bDescriptorType =
2011 Dec 02
2
problem setting expectation for test with delayed::job
I''ve got something like this: # post_observer.rb after_create # ...stuff Delayed::Job.enqueue(PostSharer.new(post, post.user)) end ... # post_sharer.rb class PostSharer < Struct.new(:post, user) def perform # Delayed::Job calls .perform on the object passed into enqueue end end # post_controller_spec.rb it "shares the post" do
2007 Jan 18
2
How to use API from AWS -- help!
I''m building a users web service (direct dispatching) that will (I hope) allow several other applications to manage the same pool of users. Plus it will act as a single-sign-on solution for what I''m doing. But I''m having difficulty accessing the UserAPI. Here''s what I''ve done so far: $> rails usermanagement - "usermanagement" is the
2018 Aug 19
2
TrippLite SMX1500LCDT FreeBSD 11.2 trouble
Hi Everyone, I'm having trouble getting TrippLite SMX1500LCDT to work on FreeBSD 11.2, nut 2.7.4 installed from FreeBSD port. The debug output is rather big when I'm starting usbhid-ups initially, Please find that attached (gzipped to comply with message size limit). Subsequently, until I unplug and replug the USB cable, I'm geting a shorter debug output, like this: Network UPS
2006 Mar 12
1
a better way to alias methods
Hi is there a better way to accomplish this task? class PortfolioController < ProjectController layout ''portfolio'' def boing redirect_to :action=>:index end alias_method :new , :boing alias_method :destroy , :boing alias_method :edit , :boing alias_method :update , :boing end My portfolio controller implements view only
2012 Dec 01
6
Why does 'extend ActiveSupport::Concern' cause `undefined method 'recycle!'`?
Working on Rails Engine. I want to make the controllers customizable whereever the Rails Engine is used. Therefore, I was trying to use `extend ActiveSupport::Concern` on the Engine controller class and include it in MyRailsApp. https://gist.github.com/4185823 # code in my rails engine moduel MyEngine class SomeController extend ActiveSupport::Concern def engine_some_method