Displaying 20 results from an estimated 400 matches similar to: "Simple code dosn't work"
2011 Sep 13
12
Assertions for asynchronous behaviour
Hi all,
In GOOS[1] they use an assertion called assertEventually which samples the system for a success state until a certain timeout has elapsed. This allows you to synchronise the tests with asynchronous code.
Do we have an equivalent of that in the Ruby / RSpec world already? I know capybara has wait_until { } but that''s fairly rudimentary - the failure message isn''t very
2011 Oct 18
3
Database custom formatter
I am trying to write a custom formatter to update a database record based on
example results. Having a lot of trouble, so I thought to ask if anyone has
a custom formatter that writes results to a database or outputs results in
JSON or some other programmatic format. A working example will go a long way
in helping me work thru my own use case.
Thanks
-------------- next part --------------
An
2003 Oct 22
1
Filesystem panic
Hi,
I'm running RH9, 2.4.20-18.9. Each night, the server mounts
an external FAT32 disk using firewire, and performs backups
to it using rsync.
Twice within the past 3 months, the backup process has resulted
in machine crash (complete hang, hardware reboot needed).
From /var/log/messages:
Oct 22 04:02:20 yoda kernel: Filesystem panic (dev 08:21).
Oct 22 04:02:20 yoda kernel: fat_free:
2009 Jun 11
1
Last Chaos dosn't install
Hi Community,
I tried to install the german version of "Last Chaos " (http://lastchaos.gamigo.de/download/) on my Linux PC
(Opensuse 11.1)
Code:
tim at arno:~> uname -a
Linux arno 2.6.27.23-0.1-default #1 SMP 2009-05-26 17:02:05 -0400 x86_64 x86_64 x86_64 GNU/Linux
tim at arno:~> rpm -q wine
wine-1.1.23-1.1
But there is an Error:
Code:
Error Number: 0x80040706
2014 Mar 26
1
The letter "ש" or "a" button in hebrew is by default dosn't write the requested letter.
I have been running CentOS and I have found out that there is a key that
is not defined well.
The "a" or "?" which actually causes by a button press to a sing which
is called "new shekel" or "Shekel Chadash" which is two letters together.
What can I do to fix it? maybe someone have seen this in the past?
Eliezer
2003 Oct 26
1
include & exclude dosn't work...
Hello rsync,
I run Rsync as standalone server (--daemon). Here is my rsync.conf
file
use chroot = yes
max connections = 10
#syslog facility = local5
log = /var/log/rsyncd.log
[mp3files]
path = /home/guitar
comment = directory
read only = yes
list = no
secrets file = /etc/rsyncd.secrets
auth users = gate1
# hosts allow =
# hosts deny =
2006 Mar 01
1
detect-renamed dosn't work?!
Hi lhere,
i'm trying the detect-renamed patch in 2.6.7pre2 in a really small
scenario. Having two dirs with some files rsyncing to destination.
First I have no delete switches on, at least I will need them.
Heres the command I use:
rsync -e "ssh -i /root/.ssh/srv-key" -r -p -o -g -v -z -l -t
--detect-renamed --stats /root/test/ srv:/root/test --progress (--fuzzy)
When I
2000 Mar 30
0
Samba dosn't seem to work when bridging is enabled under FreeBSD 3.4
Hi,
I have been trying to set up a network bridge on my FreeBSD 3.4 machine (hades),
and as soon as I enable the bridge, Samba stops servicing requests from both
sides of the network.
The following is a 'diagram' to give you an idea of my setup.
|------|
|----+Charon|
|-------| |----| | |------|
|Neptune+----+Hades+----|
2006 Sep 25
2
@article.article_groups.delete_if... Dosn't work!
If I try:
@article.article_groups.delete_if {|x|
x.group_id == x.group_id
}
It does nothing.
If I try:
articletmp.article_groups.each{ |x|
@article.article_groups.delete(y)
}
It deletes some of the groups.
@article.article_groups.clear
works.
Why dosn''t the to first examples work as expected??
Do I have to put groups I don''t want to
2008 Jun 12
2
Use of ''should'' in another thread
Hi,
I''ve tried to find anything about using ''should'' within a Thread, but
it is a little hard do look up there, so I hope you forgive-me if I am
asking an "old question".
I guess this spec should fail:
describe Thread do
it "must be fine" do
Thread.new { true.should_not be_true } # Why don''t fail?!
end
end
It seems that some
2001 Nov 02
5
What about Control Panel?
I have a no-windows Wine configuration.
What happens if I install an application that a.o. adds a module to the
Windows Control Panel? Is there a fake Control Panel for this?
2007 Oct 04
7
Using Predicates to look at an array..
Hi all,
I have an array of shipping_type''s being returned, and I want to see
what is in there. In the past I have done:
shipping_type.include?(Cart::SHIPPING_TYPE_REGULAR).should be_true
This works, but looks really ugly.. It just doesn''t roll of the
tongue very well. I then looked up the use of Predicates, which I
had been using, but hadn''t realized:
2012 Feb 23
2
testing around_save
I''ve just upgraded to Rails 3.2.1 and I can''t get my specs checking
whether or not around_save work anymore.
I simply did something like:
object.should_receive :around_filter_name
object.save.should be_true
(Actually, it was slightly more complex, it''s part of a state machine)
2008 Aug 27
3
array_including()
I found myself having to write this today:
class ArrayMatcher
def initialize(array_to_match)
@array_to_match = array_to_match
end
def ==(other)
ok = true
@array_to_match.each do |item|
ok = ok and other.include?(item)
end
ok
end
end
def array_including(array_to_match)
ArrayMatcher.new(array_to_match)
end
Is there already something in the
2007 Jul 31
11
helper spec not finding rails core helpers
Hi,
My helper specs were going ok until I added a call to a rails
DateHelper method in one of my helpers
http://api.rubyonrails.com/classes/ActionView/Helpers/
DateHelper.html#M000574
The helper runs fine from my view templates, just dies in the spec test.
I boiled my question down to a simple (not too useful) example. I''m
not sure what I''m missing.
#
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
Hello,
Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test,
if self.create method can take more than two arguments. But, when I try to
run my test. It showed
*PdfHelper Should have two arguments
Failure/Error:
create_pdf.should_receive(object,template).with(user,file)
NameError:
undefined local variable or method `create_pdf'' for
2007 Sep 04
3
Model Specs: Fixtures vs Mocks + Stubs?
What is the general opinion about fixtures versus mocking and stubbing
in model specs? I heard from agile on IRC that they save the database
testing for integration testing, but I also see that the caboose
sample applicaiton uses fixtures. I also noticed that on the rspec
site, it says "Ironically (for the traditional TDD''er) these are the
only specs that we feel should actually
2004 Jul 14
12
HP-UX 11i and largefiles on rsync 2.6.2
Hello,
I'm running HP-UX 11i on an rp74xx. It's 64-bit.
C compiler is as follows:
B3901BA B.11.11.03 HP C/ANSI C Developer's Bundle for HP-UX 11.i (S800)
B3913DB C.03.30.02 HP aC++ Compiler (S800)
/usr/bin/cc:
LINT B.11.11.02 CXREF B.11.11.02
HP92453-01 B.11.11.02 HP C Compiler
$ Sep 8 2000 23:13:51 $
I have successfully compiled rsync 2.6.2 and it
2011 Mar 03
1
Does RSpec interfere with Pathname#dirname or Pathname#realpath ?
Hi,
I starting a new project, and have run into behavior I cannot
replicate in irb, (i.e. outside of using rspec) when the directory?
returns true, so I thought I''d ask here, in case any one has seen this
badhavior.
ruby-1.9.2-p136
rspec (2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
When I try to run this spec:
require Pathname(__FILE__).ascend { |d|
2003 Dec 17
3
(no subject)
Hi all
How can I make * ring one phone then if no answer
Go to a different extension ??
Any help always appreciated
Regards Mick