similar to: "once" not honored?

Displaying 20 results from an estimated 1000 matches similar to: ""once" not honored?"

2007 Dec 29
15
Do you think it would look cleaner?
I was looking over some of my specs. I was thinking that the following: @game.should_receive(:name).and_return(''The Battle for Blaze'') @game.should_receive(:people).and_return(5000000) @game.should_receive(:activated).and_return(true) Would it look cleaner if I could do this instead? @game.should_recieve_and_return( :name => ''The Battle for Blaze''
2004 Jun 29
1
SEGV using --delete and multiple sources
When attempting to sync multiple sources to a single area, /fs/lib# ls ./ ../ bin/ founder/ skill/ var/ I want to combine these four rsyncs /usr/local/bin/rsync --exclude '.snapshot' --stats -v --bwlimit=1024 --delete -atz 'host::lib/bin' . /usr/local/bin/rsync --exclude '.snapshot' --stats -v --bwlimit=1024 --delete -atz 'host::lib/var' .
2005 Aug 11
1
Problem connecting a USB modem.
Hi I'm trying to connect a USB CDMA modem (z010) to a CentOS 4.1 (kernel 2.6.9-11.EL) and I can't talk to the modem. I tried the same modem under Fedora Core 1 (2.4.22-1.2199.nptl) and it works like a charm. The only difference is /dev/ttyACM0 for CentOS and /dev/input/ttyACM0 for the Fedora. Any help would be appreciated. Tank's. Fernando Lan?a Some debug info: CentOS:
2007 Nov 01
2
Writing controller specs
One thing that is bothering me about my controller specs is that sometimes I end up with a number of examples that are the same except for the example name. The reason that this happens is that I''ve expressed all the expected behavior with should_receive. While this does more or less work as intended it doesn''t feel right. As an example, let''s say I''m writing
2005 Apr 20
1
IPC$ entries not deleted from connections.tdb?
Back to this problem Here a proof of it: 1. smbd version 3.0.11 started yaberge2@sda6 ==> p smbd root 13820 20662 0 08:05:39 - 0:00 /usr/local/samba/sbin/smbd -D -s/usr/local/samba/lib/smb.conf root 20662 1 0 08:05:39 - 0:00 /usr/local/samba/sbin/smbd -D -s/usr/local/samba/lib/smb.conf yaberge2@sda6 ==> /usr/local/samba/bin/smbstatus Samba version 3.0.11
2007 Oct 01
0
View Spec - Misbehaving
I''m trying to write my first view spec; I''ve done some controller specs with integrated views, but thought that isolating the views for some of these tests might be nice. So I wrote this: > describe PlayerContainer, "show" do > > PARENT_ID = 12 > CHILD_NAME = ''Child Name'' > PARENT_NAME = ''Parent Name'' > >
2000 May 10
0
patche for samba-2.0.7/source/smbd/conn.c
Dear all, I have made patch for samba-2.0.7/source/smbd/conn.c This will, instead of using by-directional link, use array for managing connections. # The patch does seems to work on my RHL6.1Ja(fixed) version of # Linux machine. I don't know about other OS/Architecture. This should work better then original because: 1) The original code used bitmap.c for looking empty area. But using
2007 Jun 03
3
should_receive.again
Hi, It appears that if I have 2 should_receives in a row, the latest one overrides the previous one(s). If there isn''t one, could we add a way to accumulate them, such as @thing.should_receive(:method).and_return(@value) @thing.should_receive(:method).again.and_return(@value) @thing.should_receive(:method).again.and_return(@value) would be equivalent to
2008 Apr 22
0
rspec model class methods
I''ve started specifying a project and could use some help. I''m not sure if the spec is entirely necessary, it would be great to get some guidance on a best practice or something close. I recently realized the need to add the method below grouped_by_months and started to write a spec. idea 1: {{{ before do @comment = Comment.new
2008 Feb 04
1
Error on nil.build
I can''t figure out why I am getting an error for one of the tests below: ======================== describe AccountsController, "POST" do before :each do @user = mock_model(User) @account = mock_model(Account, :id => 1, :valid => true, :save => true, :users => mock("users", :build => @user)) Account.should_receive(:new).and_return(@account)
2007 Jan 29
0
mock.with(Hash) expects an Array ?
Hi all, I looked at the open issues on the bug tracker, but couldn''t find anything related to this. I also searched the archives. And I can''t believe someone didn''t hit on this before. Here''s my spec: context "A project owner" do controller_name :roles setup do controller.stub!(:current_user).and_return(@user = mock("user"))
2005 Jul 11
1
indexing into and modifying dendrograms
I would like to be able to exert certain types of control over the plotting of dendrograms (representing hierarchical clusterings) that I think is best achieved by modifying the dendrogram object prior to plotting. I am using the "dendrogram" class and associated methods. Define the cluster number of each cluster formed as the corresponding row of the merge object. So, if you are
2007 Oct 26
5
specing rescue, ensure and else blocks of an Exception
Greetings, I''m using rspec with rcov for my applications and there is one issue which I cannot solve nor can find any proper information regarding it: specing what is in a rescue block in case of an exception. I''m using Ruby on Rails and I usually make use of exceptions in my controllers, like the following example: def action @foo = Foo.find(1)
1998 Oct 08
0
readbraw vs. readX
Using Samba 1.9.18p10 I have found a difference between Win95 and WinNT: opening 'Lotus Freelance' files from Win95 is really slow (about 17 kB/s only) vs fast (~hundreds of kB/s) from WinNT. Looking into the log (with debug level=4) I see using Win95: switch message SMBopenX (pid 33994) Skipping become_user - already user unix_clean_name [./PRIVATE/Goyal_Sep98.PRZ] Got dir cache hit on
2007 May 03
1
unexpected failures with --reverse
I''m having trouble figuring out why one of my specs passes when run without --reverse and then fails with --reverse. What am I missing? I''m using the plugin versions of both rspec and rspec_on_rails 0.9.2. Here is the offending spec (Bill is an ActiveRecord model in a Rails app): ---------- describe Bill, " when valid" do def valid_bill_attributes { :uuid =>
1998 Mar 18
1
Troubles with NT domain logons ?
Dear Sirs ! I succesfully setup samba 1.9.18p3 to work with domain logons of win95. Works perfectly. Also I tryed to compile samba with -DNTDOMAIN and configure NT to with domain logons. If samba compiled with-NTDOMAIN, NT can't work with samba in any way - w/ domain logons and w/o. Below log file that created by samba, when I tryed to setup NT to domain logon to samba. Note: I uses unix
2007 Jun 11
2
Testing create in Rails controller
Hi All So I am a first-time caller ;-) ... and have been trying to apply RSpec to the depot example in Dave Thomas'' book as I build the application. I am having a problem testing the admin controller create method and cannot quite see where I am going wrong so was hoping for a pointer :-) My spec looks like: describe AdminController do before(:each) do @product =
2007 Jun 14
1
rspec will_paginate
Hi Rspec-Users, I''m not sure if I am correctly specing my index since I''m using will_paginate. params[:filter_by] will filter the paginate list accordingly. Tickets Controller: def index @tickets = Ticket.filter_status_by(params[:filter_by],params[:page]) end Ticket Model: def self.filter_status_by(status, page, per_page = 10) conditions = {:status => false} if
2010 Jul 29
1
Testing controller and action with parameters
I have an action and I am testing it like this: The action: ========== def create @event = Evento.new(params[:event]) @event.aproved = false if @event.save redirect_to :action => "index" else render :action => "new" end end The RSpec test: ============== before do @event = mock_model(Event)
2011 Jul 27
3
Rspec with ActionMailer and .deliver
I''m in the process of migrating from Rails 2 with rspec 1 to Rails 3 with rspec 2, the process has been going pretty well, however, today I came across an issue that I wanted to share. I have a controller that sends out an email through a mailer. Rails 2 code: CurriculumCommentMailer.deliver_comment_update(@curriculum_comment, "created") Rails 3 code: