Displaying 20 results from an estimated 500 matches similar to: "Assertions for asynchronous behaviour"
2012 Apr 04
5
Simple code dosn't work
I think you have a syntactical error on the line thats throwing the
error, you state:
> j.even?should be true #throws an error on j == 2, j == 4
should this line not read as:
j.even?.should be true
--
Posted via http://www.ruby-forum.com/.
2011 Dec 05
5
Spec'ing a block
Hi folks
How would you spec something like this:
as_user username do
FileUtils.chmod_R 0755, "#{directory}/*"
end
Where as_user fires off a new process (and set uid to username).
It seems that this won''t catch FileUtils.chmod_R:
FileUtils.should_receive(:chmod_R).with(0755, "#{@domain.directory}/*")
I guess that is because it is passed in the block
2011 Oct 18
8
rspec 1.3.2, Rails 2.3.14 - plugins not loading
Hi there
I have a weird situation. I have inherited a project in Rails 1.2.3
that has been upgraded to Rails 2.3.14 (and is running). I have
installed Cucumber and Rspec to start to write features/tests for the
new code that needs to be written. In my Gemfile, these Gems are
loaded:
group :test do
gem ''rspec-rails'', ''~> 1.3.4'', :require =>
2011 Jul 29
2
How can I make before/after all a method?
I would like to turn this:
describe TestClass do
before :all do
# set some config
end
after :all do
# restore some config
end
# do a bunch of tests to this
end
into
describe TestClass do
with_config_value(X)
# do a bunch of tests to this
end
Basically, I want to include before :all and after :all clauses into a test.
However, I do not want this to apply toa ll tests.
Thanks in advance.
2011 Sep 07
4
rspec testing inheritance
Hello,
Is there any way to test model inheritance in spec?
something like..
it { ChildModel.should < ParentModel }
thanks.
2012 Feb 21
8
should_receive_chain
Do you often find yourself doing this:
active = double(''active'')
active.should_receive(:first)
users = double(''users'', active: active)
account.should_receive(:users).and_return(users)
for this:
account.users.active.first
?
Of course, we could use stub_chain, but that doesn''t let us know
*where* the chain broke.
Would you like to do this?
2012 Feb 05
4
testing framework for test automation
Hello,
Anyone working in QA Test Automation with RSpec wouldn?t mind posting
their testing framework or know where I can go to get more info on
testing frameworks either with RSpec or Cucumber? I greatly
appreciate. Thank you.
2012 Jun 14
3
Selenium+Autotest: how to run browser in background?
Hey guys
After hours of hard work I finally managed to set up my development
environment to run cucumber scenarios using autotest and selenium.
What''s a bit bugging is the fact that Firefox always jumps to the
foreground when Autotest does its job. How can I keep Firefox in the
background so that I can continue with my work without being
interrupted?
Thanks!
--
Posted via
2012 Feb 13
11
stale records with integration testing?
Hi,
I was writing an integration test for my user signup form (with
capybara), and found that my test was failing due to a validation error:
"email is already taken". I''m a bit confused because I thought when I
run "rspec spec/some_spec.rb", the test database would be wiped clear?
Is that not the case?
Patrick J. Collins
http://collinatorstudios.com
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
2008 Sep 09
12
cucumber - mark a step as pending
I love the way I can throw a call to pending() in the top of an
unfinished RSpec example and stop it from failing the build.
Is there a similar way to do such a thing with good ole'' cucumber?
cheers,
Matt
----
http://blog.mattwynne.net
http://songkick.com
In case you wondered: The opinions expressed in this email are my own
and do not necessarily reflect the views of any former,
2011 Jun 06
9
rake 0.9.0 activated error + debugger not working?
Hi everyone,
I am using rvm, and when I try to do rake spec, I get:
"You have already activated rake 0.9.0, but your Gemfile requires rake 0.8.7.
Consider using bundle exec."
... Is there a way to get around this so I don''t have to do bundle exec rake spec each and every time?
Also, I tried throwing ''debugger'' into one of my specs and I get:
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:
2012 Aug 31
5
Question1 Cucumber Rails
can we write multiple background in one feature file....?
can we write multiple feature in one feature file.....?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2009 Feb 05
2
[Cucumber] Progress Bar
Inspired by Nick Evans'' RSpec progress bar[1], I had a little crack at
implementing the progress bar for cucumber, ''cause I want to know how
long a break I can take while the features are running :)
It''s in my fork, in the coverage_formatter branch:
http://github.com/mattwynne/cucumber/tree/master
It will dump failing feature, scenario, step and the exception as
2011 Aug 05
5
named context or calling include_context with block?
Hello,
I''m playing around with Rspec again after going from test/unit to
rspec then back to test/unit... :) Right off the bat, I find myself
wanting to do something like this: https://gist.github.com/1128091
Basically, I want to name a context, then call it later by name,
passing a block to it.
Or in other words... what is the best way to DRY this code?
2011 Mar 04
5
How to intercept an instance method from StdLib (1.9.2)
Hi,
I''m struggling with something that seems to be simple, and I''ve not
had any joy following the RSpec books suggestions (p. 187).
I''d like to test that a method raises and error when a file is not found.
I''ve tried adding this in my example just before I call my method, but
it never seems to get invoked.
Pathname.stub(:exist?).and_return(false)
The whole
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
This race condition can be easily reproduced by hot plugging a number of
virtio-blk disks.
Also in systemd, there used to be a related workaround in udev rules
called
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
This race condition can be easily reproduced by hot plugging a number of
virtio-blk disks.
Also in systemd, there used to be a related workaround in udev rules
called
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
On Tue, 06/28 04:45, Christoph Hellwig wrote:
> On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote:
> > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
> > point we haven't created the serial attribute file, therefore depending
> > on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
> > created.
> >
>