Displaying 20 results from an estimated 4000 matches similar to: "Best way to test tasks"
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit
test of a model. In particular, doing the test for the associations and the
ActiveRecord validations.
I started writing the validations but my tests didn''t look DRY at all.
Before refactoring the tests checked out and look for other people
solutions.
I found out shoulda-matchers and Shoulda (which if I
2011 Jul 26
1
ActiveRecord has_many associations
Given the models Country, State, City and Person as follows.
class Country < ActiveRecord::Base
has_many :states
end
class State < ActiveRecord::Base
belongs_to :country
has_many :cities
end
class City < ActiveRecord::Base
belongs_to :state
has_many :people
end
class Person < ActiveRecord::Base
belongs_to :city
end
Is there any way that doesn''t allow to delete
2011 May 31
1
Calendars in Rails
Hi all,
I''m currently in the need to implement a calendar in rails.
It should be able to present a year, month and day view.
The events in these 3 views should be able to be opened, on click, to view
the information and/or edit it (according to restrictions).
The events will belong to users. One requirement is that users could filter
which other users events they want to see (different
2011 Aug 03
2
How to test modules and custom validators
I''m trying to have most of the important stuff tested and in order to do
that I run in front of some stuff I''m not quite sure which is the best way
to test them.
At this time I am having question around how to test modules and the custom
validators (the typical email format validator for example).
To test a module the best I saw up to now was finded here:
2006 Apr 06
5
Acrobat Reader broken on CentOS 4.3
I have had Adobe Acrobat Reader 7.0.1 installed on my CentOS 4.2 desktop
and it worked fine. After upgrading to 4.3, I can't get it to come up
anymore. I downloaded Acrobat Reader 7.0.5 and it does the same. I'd
appreciate any suggestions on what to look for, since the executable and
the startup scripts are not giving me any useful errors to chase.
--
Ron Loftin
2008 Jan 08
2
Problems with rspec 1.1 required inside rake tasks
This is interesting.
The default rspec rake tasks generated by Hoe give you an rspec.rake
file that looks like:
> begin
> require ''spec''
> rescue LoadError
> require ''rubygems''
> require ''spec''
> end
>
So far so good.
When you invoke rake to do something, say check_manifest
> rake check_manifest
>
You
2020 Jun 27
2
HP vs. Brother Printers: Use with Centos/Fedora
We currently have a Brother MFC-5490CN. Printer firmware is dated June 1010. (yeah, 10 years old). Few years ago the brother software
wouldn't work for printing under Fedora. No problem, can print under Windows 10. Then it stopped scanning. Could still print...under
Windows.
Now, to fix the scanning features working I installed updated drivers under Windows, now it scans like champ, but
2009 Feb 03
3
Rcov - Specifying rake tasks
I am trying to get a customized rcov rake task working. What I have so
far looks like this:
desc "Rcov code coverage reports"
require ''rcov/rcovtask''
require ''spec/rake/spectask''
require ''cucumber/rake/task''
task :rcov => "rcov:all"
namespace :rcov do
Rcov::RcovTask.new(:all) do
task :rcov =>
2020 Jun 27
2
HP vs. Brother Printers: Use with Centos/Fedora
On Sat, 2020-06-27 at 15:44 -0600, Frank Cox wrote:
> On Sat, 27 Jun 2020 17:33:39 -0400
> Jay Hart wrote:
>
> >
> > If you had to rate which printer brand works better with Linux
> > (Fedora and
> > Centos), what would it be?
> Any Brother printer that I've ever had the misfortune to have to deal
> with either didn't work at all or if could be made
2007 Sep 04
7
Rake tasks getting in the way of edge (uses gem instead)
So I''d been running gem releases of rspec for the past several months,
and I installed edge rspec so that I can use Story Runner.
I''m running into a problem because I''ve got a couple rake tasks that
reference "spec/rake/raketask". If I try to run "rake spec" then it
pulls in the gem version instead of the plugin version. rake blows up
saying that
2005 Dec 02
1
acroread security problem
Dear all,
I think there's a security problem with the acroread plugin for firefox.
I'm using sysutils/pwsafe to manage my passwords. A feature of this
tool is that it can copy the requested password to the X clipboard,
allowing the user to paste it (eg. in a password box), never seeing
the pass in clear.
When I load a PDF document in Firefox, the acroread process lives on
even after the
2015 Feb 20
2
sipsak 200 for a user, but 404 for a different user...why?
On Fri, 20 Feb 2015 15:07:35 -0500, Andres wrote:
> This is showing nothing so I don't think your test message even made it
> here. I think it looped in the 'doge' server.
I was wondering the same thing :)
in tleilax, I looked in /var/log/asterisk/messages and see:
[Feb 20 15:13:19] VERBOSE[3661] chan_sip.c: [Feb 20 15:13:19]
<--- SIP read from UDP:192.168.1.3:38154
2011 Aug 02
1
Rspec teting API.
Hi!
Guys, I wanna test an API built in Rails 3.0.3.
So, my question is... What''s the better way to test my own api?
I guess that a requests specs like these:
describe ''POST /client''
it ''works'' do
assert_difference post ''/clients'', :client => {...}
end
end
can be appropriate...
Someone just tested an API? I mean... simulate
2011 Aug 02
2
[LLVMdev] Multiple successors, single dynamic successor
Suppose I have a bb with N predecessors and N successors. What is, in
your opinion, the best way to express that the bb has (dynamically) only
one successor (i.e. if coming from the i-th predecessor we will always
jump to the i-th successor)?
b.r.,
--
Carlo Alberto Ferraris <cafxx at strayorange.com
<mailto:cafxx at strayorange.com>>
website/blog
2013 Jul 10
1
postfix as default MTA
I noticed when CentOS 6 came out that RHEL had moved to postfix
vice sendmail as the default MTA. I had never heard the rationale
given, it always sat on the back burner, but I was reminded of the
question the other day when I was dealing with a related topic.
I don't want to get into a pissing contest about how one MTA is
obviously better than the other, nor why others think that I should
2009 Aug 13
2
/etc/init.d/gdm for centos5
Does anybody know how to restart X in centos 5.3? /etc/init.d/gdm | xdm
seems to be missing.
thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20090813/671fde5f/attachment-0003.html>
2009 Aug 17
2
ssh-agent autostarting
Hello,
I'm trying to get public key authentication working on a client to
server connection so i can drop passwords. I've got the keys in place and
confirmed they are working. I'm now trying to set up ssh-agent, I read i can
do it manually i was looking for a more automated method for users on login.
This is not through a gui.
Thanks.
Dave.
2009 Nov 14
3
pan news reader
Does anyone know if the pan news reader works
on CentOS 5.4? I am considering installing
version 0.132 that I downloaded from
pan.rebelbase.com .
Thanks for your advice.
Mike.
2009 Nov 25
3
port forwarding using iptables
Hi listmates,
Happy Thanksgiving!
Does anybody know if there is a convenient utility to configure
iptables on a CentOS 5.4 or 5.3 machine to do port forwarding? And if
not, where and how does one put the requisite commands?
Thanks.
Boris.
2010 Apr 06
1
ssh-agent
Yesterday or Friday, don't remember, I happened to be looking at my
processes on my machine, and discovered I had a number of ssh-agents
running (all mine), from different days. I killed all but the current
day's.
Now, I log out every single night.
I checked the next day, and sure enough, the one I started the previous
day was still running, and I could not only use ssh-add, and it