Displaying 20 results from an estimated 3000 matches similar to: "Rails controller specs and private helper methods"
2008 Sep 16
10
autospec is not picking latest changes
Hey Guys.
I just updated a project form 1.1.4 that was working with autotest
3.10 without issues:
1) Updated spec/model/project_spec.rb and it fired only that spec.
2) Updated app/model/project.rb and it fired only the matching spec file.
After the update of rspec and rspec-rails as plugins a few minutes
ago, it only run the controller specs and no other. Also, it doesn''t
matter which
2012 Mar 07
0
LoadError: Expected X to define on gem upgrade
I''m upgrading to the latest version of ActiveAdmin and am running into the
following when trying to start the app:
Expected ../app/model/store/base.rb to define Base
base.rb defines base like:
module MyApp
class Store::Base
end
end
I''ve done some digging and found that ActiveAdmin did some refactoring to derive everything from a BaseController. It also depends on
2009 Oct 14
14
spec-ing private methods?
On Wed, Oct 14, 2009 at 5:49 PM, Scott Taylor <scott at railsnewbie.com> wrote:
>
> On Oct 14, 2009, at 3:36 PM, Joaquin Rivera Padron wrote:
>
> hello there,
> how do you tipically spec private methods? The thing is ? have something
> like this:
>
> def some_method
> ?? complex_method + other_complex_methods
> end
>
> private
> def complex_method...
2012 Jan 23
1
Moving-Tiles Bootstrap
I wish to perform moving tiles bootstrap resampling on some gridded data
meteorological data. I've many years experience with S-Plus, but it has
no way to perform a moving-tiles bootstrap. Within R I've learned how to
use quadratresample() with the spatstats package and would be happy to
simply use empirical percentiles if generating the replicates were fast,
but it isn't. So,
2009 Feb 06
6
RecordNotFound bubbling thru to cucumber
Hello,
I have a controller action that raises a RecordNotFound exception if
you''re not allowed to see something. In my global application
controller (application.rb), I catch these and render the 404
template. But when I run cucumber (using webrat), it''s getting the
full stacktrace (the step blows up). Any ideas why? I have
consider_all_requests_local turned off in my test.rb.
2009 Sep 22
4
rspec-rails and rack middleware
It doesn''t seem like my controller specs are calling my middleware on
requests. Has anyone figured out a good way to test middlware with rspec?
I''m thinking something like
rails'' rails/actionpack/test/controller/session/mem_cache_store_test.rb but
with rspec... any thoughts?
Thanks!
Best,
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
2020 Jun 11
0
[PATCH v1] virtio-mem: add memory via add_memory_driver_managed()
virtio-mem: add memory via add_memory_driver_managed()
On Thu, Jun 11, 2020 at 11:35:18AM +0200, David Hildenbrand wrote:
> Virtio-mem managed memory is always detected and added by the virtio-mem
> driver, never using something like the firmware-provided memory map.
> This is the case after an ordinary system reboot, and has to be guaranteed
> after kexec. Especially, virtio-mem
2020 Jun 11
2
[PATCH v1] virtio-mem: add memory via add_memory_driver_managed()
Virtio-mem managed memory is always detected and added by the virtio-mem
driver, never using something like the firmware-provided memory map.
This is the case after an ordinary system reboot, and has to be guaranteed
after kexec. Especially, virtio-mem added memory resources can contain
inaccessible parts ("unblocked memory blocks"), blindly forwarding them
to a kexec kernel is
2020 Jun 11
2
[PATCH v1] virtio-mem: add memory via add_memory_driver_managed()
Virtio-mem managed memory is always detected and added by the virtio-mem
driver, never using something like the firmware-provided memory map.
This is the case after an ordinary system reboot, and has to be guaranteed
after kexec. Especially, virtio-mem added memory resources can contain
inaccessible parts ("unblocked memory blocks"), blindly forwarding them
to a kexec kernel is
2007 Mar 21
1
Thanks!
Hello,
I just recently switched my system from a BincIMAP/vpopmail to a
Dovecot/vpopmail system, and I have to say: thanks!
There were really only two things I had to patch Dovecot to do: first,
provide statistics on network usage, and second, to allow folders to
be LIST'd/SELECT'd/etc. with a trailing separator (to satisfy my pine
users). If anyone's interested, I can generate a
2009 Sep 30
10
Can't run specs after upgrading gems... get 0 tests, 0 assertions...
So after I updated all my gems, I started getting:
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/
dependencies.rb:105:in `const_missing'': uninitialized constant
Test::Unit::TestResult::TestResultFailureSupport (NameError)
from /Library/Ruby/Gems/1.8/gems/test-unit-2.0.3/lib/test/unit/
testresult.rb:28
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
2020 Apr 29
0
[PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED
Some paravirtualized devices that add memory via add_memory() and
friends (esp. virtio-mem) don't want to create entries in
/sys/firmware/memmap/ - primarily to hinder kexec from adding this
memory to the boot memmap of the kexec kernel.
In fact, such memory is never exposed via the firmware (e.g., e820), but
only via the device, so exposing this memory via /sys/firmware/memmap/ is
wrong:
2020 Apr 30
0
[PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED
On Thu, Apr 30, 2020 at 12:20 AM David Hildenbrand <david at redhat.com> wrote:
>
> On 29.04.20 18:08, David Hildenbrand wrote:
> > Some paravirtualized devices that add memory via add_memory() and
> > friends (esp. virtio-mem) don't want to create entries in
> > /sys/firmware/memmap/ - primarily to hinder kexec from adding this
> > memory to the boot memmap
2020 May 02
1
[PATCH v2 2/3] mm/memory_hotplug: Introduce MHP_NO_FIRMWARE_MEMMAP
>> Now, let's clarify what I want regarding virtio-mem:
>>
>> 1. kexec should not add virtio-mem memory to the initial firmware
>> memmap. The driver has to be in charge as discussed.
>> 2. kexec should not place kexec images onto virtio-mem memory. That
>> would end badly.
>> 3. kexec should still dump virtio-mem memory via kdump.
>
> Ok,
2020 Sep 08
0
[PATCH v2 3/7] mm/memory_hotplug: prepare passing flags to add_memory() and friends
We soon want to pass flags, e.g., to mark added System RAM resources.
mergeable. Prepare for that.
This patch is based on a similar patch by Oscar Salvador:
https://lkml.kernel.org/r/20190625075227.15193-3-osalvador at suse.de
Acked-by: Wei Liu <wei.liu at kernel.org>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Michal Hocko <mhocko at suse.com>
Cc: Dan Williams
2020 Sep 10
0
[PATCH v3 3/7] mm/memory_hotplug: prepare passing flags to add_memory() and friends
We soon want to pass flags, e.g., to mark added System RAM resources.
mergeable. Prepare for that.
This patch is based on a similar patch by Oscar Salvador:
https://lkml.kernel.org/r/20190625075227.15193-3-osalvador at suse.de
Acked-by: Wei Liu <wei.liu at kernel.org>
Reviewed-by: Juergen Gross <jgross at suse.com> # Xen related part
Cc: Andrew Morton <akpm at
2010 Nov 01
2
Creating RESTful helpers on the fly
If I have a resource called ''assets'' then I get for free a bunch of
helpers, like
assets_path
new_asset_path
and so forth, right?
I would like to be able to create a call to one of these on the fly when
I only find out the name of the resource at run time. For example I
would like to do this:
resource_name = "assets"
resource_path(resource_name, method => :new)
2020 Jul 31
0
[PATCH RFCv1 3/5] virtio-mem: try to merge "System RAM (virtio_mem)" resources
virtio-mem adds memory in memory block granularity, to be able to
remove it in the same granularity again later, and to grow slowly on
demand. This, however, results in quite a lot of resources when
adding a lot of memory. Resources are effectively stored in a list-based
tree. Having a lot of resources not only wastes memory, it also makes
traversing that tree more expensive, and makes /proc/iomem
2011 Feb 14
0
Devise is causing the [The change you wanted was rejected.] Error...
I am using the custom made Devise controller.
I moved from PHP to Rails that, old users password are stored in
Devise:user table in form of
"devise_encryption(oldencryption(password))"
If an user login, and app finds out that this user''s password is in
form of "devise_encryption(oldencryption(password))", I then change it
in to a form of
2020 Apr 30
2
[PATCH v1 2/3] mm/memory_hotplug: Introduce MHP_DRIVER_MANAGED
On 29.04.20 18:08, David Hildenbrand wrote:
> Some paravirtualized devices that add memory via add_memory() and
> friends (esp. virtio-mem) don't want to create entries in
> /sys/firmware/memmap/ - primarily to hinder kexec from adding this
> memory to the boot memmap of the kexec kernel.
>
> In fact, such memory is never exposed via the firmware (e.g., e820), but
> only