similar to: mock out render call in helper

Displaying 20 results from an estimated 5000 matches similar to: "mock out render call in helper"

2007 Apr 12
11
Test if view renders appropriate partial?
Hello, I am testing out a partial that calls another, general purpose partial as part of its processing. Is there a class I can mock in Rails views to accomplish what I need? That is, could I do something like the following: SomeClass.should_receive(:render).with(:partial => "foo", :locals => { :bars => bars }) I tried breakpointing the view, and it looks like I am greeted
2007 Mar 15
5
rake spec:views no transaction error
Hello, I have recently upgraded to the 0.8.2 release of rSpec, and I am receiving the following message with each view spec execution: WARNING: there is no transaction in progress I have upgraded the rspec_on_rails plugin as well, and both the model and controller tests are working flawlessly. Is there some simple step I missed? thanks for the input. -Chris -------------- next part
2007 Apr 11
10
DRYer controller specs
So, I''ve been following the recommendations for controller specs here: http://blog.davidchelimsky.net/articles/2006/11/09/tutorial-rspec-stubs-and-mocks Most notably: a single expectation per specify block; the setup block contains only stubs; mock expectations each get their own specify block. (I''m still using 0.8, so I haven''t gotten the describe/it goodness yet.) I
2007 Apr 11
3
Suggestion: put svn url under "Contribute" section of site
Hello, I have been looking to submit a patch to RSpec, and I wanted to go about it the right way, so I loaded up http://rspec.rubyforge.org/contribute.html. The author of this page suggests that one should download from trunk to make any patches. It would be great if this section also included a url to the trunk. -Chris
2007 Dec 20
3
How-to spec this helper method?...
Hey gang, I have this dead-simple method defined in a helper: def add_category_link(name) link_to_function name do |page| page.insert_html :bottom, :categories, :partial => ''category'', :object => Category.new end end Where, and mostly how, would I spec this? I haven''t been able to find how to stub the rjs in a helper spec, so
2007 Jul 24
4
spec''ing helpers that use controller
Hi all, I''m in the process of creating rspecs for my helpers. One of the helpers in app/helpers/application_helper.rb looks like this: def page_name @page_name || "Define @page_name in #{controller.controller_name}::#{controller.action_name}" end The rspec is simply: it "should something" do page_name end
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2007 Mar 09
6
AssertSelect for strings?
Hi, Is there a way to use the have_tag matcher on a string instead of the response body from a view? I have a helper in a method rails project that returns an html fragment which I would like to test. Like this: module SomeHelper def some_helper_method "<p>foo</p>" end end context "The SomeHelper" helper_name :some specify do
2013 Sep 06
1
autologin-user-timeout
Hello, in the assumption that I understand them correctly I specified in /etc/lightdm/lightdm.conf autologin-user=xxxx autologin-user-timeout=10 so that after 10 seconds the user xxxx is logged-in automatically. What happens is that the user xxxx is logged-in immediately i.e. without any delay. Do I understand the second variable wrong or am I missing something? Thanks for any help. K.D.J.
2012 Feb 10
1
Changing the appearance of the login box
I'm the founder and lead developer of the lightweight Linux distro Swift Linux. I'm currently in the process of switching from the old antiX Linux base to the new Linux Mint Debian Edition base. The new Swift Linux will be using LightDM instead of SLiM. I've found that replacing LMDE's default GDM display manager with SLiM disables many functions (like audio). Restoring these
2013 Jan 05
1
greeter-show-remote-login on debian
Hello, I need the possibility to login to other machines on my network. With kdm it works by choosing "Remote Login" from a menu in the greeter. I would prefer not to use kdm. ;-) I saw that the option "greeter-show-remote-login" should do that for lightdm. I work with a debian "wheezy/testing" system and installed the following packages from the
2013 Jun 17
1
lightdm 1.7.2 released
Unstable release in 1.8 series. Overview of changes in lightdm 1.7.2 * Fix incorrectly distributed guest-session apparmor data Overview of changes in lightdm 1.7.1 * Fix .pc file for liblightdm-qt5-3 * Add a new option "autologin-in-background" which lets an autologin happen in a second display while still showing the greeter. * Stop if fail to create default
2006 Feb 14
22
Teaching Models to Render Themselves in the Controller
I am trying to teach my models how to render themselves, i.e. <%= my_model_object.render() %> Let me explain my reasoning and proposed method before this gets shot down as anti-MVC. Let''s say I am writing a contact-management application. I have a class Contact. I will need to display this class all over the application. My first choice is to use a partial. Now I can
2009 Jan 27
2
[RSpec] Error when returning multiple values from a stub
Hey guys. I''ve just found some odd behaviour within RSpec 1.1.12 , and would like to know whether this is a bug, or I''m doing something wrong. When I give multiple return values to a stub, like this: SubtitleFile.stub!(:new).and_return @sf1, @sf2 RSpec complains: Mock ''SubtitleFile_1001'' received unexpected message :size with (no args) However, if I
2017 Feb 04
4
Greeter openssh 7.4 is not according rfc4253.
Hi, I discovered when using my fuse fs for connecting to a remote host using sftp that the new server version 7.4 sends a greeter which is not according the format desribed in https://tools.ietf.org/html/rfc4253#section-4 There is written that the greeter "MUST be terminated by a single Carriage Return (CR) and a single Line Feed (LF) character (ASCII 13 and 10, respectively)." Now
2015 Dec 28
3
Problems to authenticate Ubuntu 14 on Samba4
Hi, I have saw many tutorials to ingress Ubuntu 14 in the Samba4 domain, but none worked properly. I put the Ubuntu workstation in the Domain, but when I try to login, appear the following messenge: "your password will be expire in 42 days " and does not permit the authentication. How can I configure correctly Ubuntu 14 workstation to authenticate in the Samba 4 domain? Thanks
2012 Aug 17
2
lightdm fails to stop & can't change login
I've been using lightdm for about a year now and with all the versions I've tried, Gentoo prints a message about lightdm and xdm failing to stop if I reboot from the lightdm menu or the xfce4 menu. If I issue 'reboot' as root from an xterm within xfce4, lightdm stops fine. I couldn't find anything in the logs, but in which one of syslog-ng's logs should I look? I'm
2009 Sep 18
2
gdm-simple-greeter config?
grep face /home/<username> -r :) -- David Fix Senior Systems Administrator Mr. X Inc. ----- Original Message ----- From: "m roth" <m.roth at 5-cent.us> To: "CentOS mailing list" <centos at centos.org> Sent: Friday, September 18, 2009 9:01:27 AM Subject: Re: [CentOS] gdm-simple-greeter config? > Greetings, > > On Fri, Sep 18, 2009 at
2015 Dec 28
2
Problems to authenticate Ubuntu 14 on Samba4
I'm using Ubuntu 14.04-64 bits I had installed with apt-get the follows packages krb5-user krb5-config winbind samba samba-common smbclient cifs-utils libpam-krb5 libpam-winbind libnss-winbind The samba version is 4.1.16-Ubuntu Below are my files of configuration */etc/samba/smb.conf* [global] netbios name = cliente-ad192 workgroup = EMPRESA security = ads realm = EMPRESA.COM
2015 Mar 23
40
[Bug 89730] New: NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 Bug ID: 89730 Summary: NV50: LightDM GTK+ Greeter Background - inconsistent display Product: xorg Version: git Hardware: Other OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/nouveau