similar to: predicate matchers

Displaying 20 results from an estimated 2000 matches similar to: "predicate matchers"

2007 Mar 06
15
mocking missing methods
Hi folks. So I''m using mocha on a ruby project, and I really like it. One thing I''ve noticed is that it can be a bit "surprising" when I''m mocking methods that don''t exist on an object, and I think there''s an easyish fix. At the moment, you use sheep = mock() to create a mock sheep. What I''d like to do is something like sheep =
2007 Oct 30
1
Facets and/or Nested Describes
I have to confess that I did not know about facets before reading Ashley Moran''s post: http://aviewfromafar.net/2007/10/21/quick-and-dirty-facets-in-rspec-trunk Not knowing about the facets solution, I made a couple of feature requests for nested describes: http://rubyforge.org/tracker/index.php?func=detail&aid=14980&group_id=797&atid=3152
2012 Jan 01
2
Lattice: Understanding How Points Connected by Lines
A data frame has one factor, one date, and one numeric column. When I plot these using the default pch of the open circle (first attachment), xyplot(TDS ~ sampdate | she.s, data = sheep.cast, main = 'TDS in Sheep Creek', ylab = 'Concentration (mg/L)', xlab = 'Time') I see the higher concentration points toward the right on several panels. But, when I change to using a
2020 Sep 13
1
metaflac --show-all-tags (patch)
Hi folks, I always wondered why there is no "metaflac --show-all-tags", in parallel to --remove-all-tags. Attached you can find a patch for your consideration. Sample output: % metaflac --show-all-tags *.flac 01 Pigs on the wing (Part One).flac:ARTIST=Pink Floyd 01 Pigs on the wing (Part One).flac:TRACKNUMBER=01 01 Pigs on the wing (Part One).flac:ALBUM=Animals 01 Pigs on the wing
2011 Apr 29
1
3-way contingency table
Hi, I have large data frame with many columns. A short example is given below: > dataH host ms01 ms31 ms33 ms34 1 cattle 4 20 9 6 2 sheep 4 3 4 5 3 cattle 4 3 4 5 4 cattle 4 3 4 5 5 sheep 4 3 5 5 6 goat 4 3 4 5 7 sheep 4 3 5 5 8 goat 4 3 4 5 9 goat 4 3 4 5 10 cattle
2007 Mar 14
5
What''s the new syntax for predicates?
@settings.should allow_publish_ip("127.0.0.1") fails with undefined method `allow_publish_ip'' for #<#<Class:0x2f8fd48>:0x2f5a968> @settings.should_allow_publish_ip("127.0.0.1") works fine This is rspec 0.8.2. http://rspec.rubyforge.org/documentation/expectations.html says that matching arbitrary predicates is deprecated and to see
2003 Jan 23
3
e2fsck too old / ext3 HTREE errors
hi, i have a tricky situation here and and don't know where to start with the solution. i happened to set up a linux system, but i had to install the base system on another machine. i used e2fsprogs 1.30-WIP (30-Sep-2002) for this. now the machine is up and running, but i have to use e2fsprogs 1.27 (8-Mar-2002). it's a debian system and i wanted to stay sane & stable, hence using
2011 Jul 04
0
mind to bitter, interest to joy, tolerance to macro, speech
Sooner or later, the same The teacher to the student in his class at the effects of collective speak, told a story. The story is: a sheep, and leave the sheep eaten by the Wolf. Finish the story, the teacher asked: "the classmates, if this sheep honestly stay in the flock, it won't be the wolves eat, isn't it?" A little boy stood up and replied, "of course. But, it is
2007 Nov 02
1
stub calls to an instance method before it is created?
I am desperately in need of functionality such as Mocha offers with their any_instance method. I see that there is an open ticket for a similar feature in RSpec, but it does not look like anything have been done. Is there any other way around this? https://rubyforge.org/tracker/index.php?func=detail&aid=6791&group_id=797&atid=3152 Here is what I am doing, and why I feel I need this
2006 Jun 13
3
Asterisk & Eyebeam chat function
Hi all, Eyebeam has a sip-chat function and it would be nice if I would be able to use it. But the problem is that I can't really find information about it. I can just try to send a message and on the Asterisk console a message like this appears: Jun 13 10:05:25 WARNING[6512]: chan_sip.c:7281 receive_message: Received message to <sip:bla@voiphost> from "Bla
2006 Mar 17
1
nlme predict with se?
I am trying to make predictions with se's using a nlme (kew11.nlme below). I get an error indicating levels for a factor are not allowed. I have searched and read Rnews, MEMSS, MASS, R-Help, and other lists in Spanish where I found questions similar to mine but not solution. I do not really care about the method used. Any suggestions to obtain predictions with se's from an nlme
2006 Jan 09
2
Pluralizations
Hi, I''m new to Ruby and Rails, and I''m running Ruby 1.8.4 with Rails 1.0 on Ubuntu 5.10 (breezy). I wanted to have a model Software, with the table as software (since ''software'' is the plural too). I appreciate one can simply use something like use_table or whatever (can''t remember the exact command) in the Model file, but I''d much rather
2004 Nov 28
3
file_set_dosmode / No data available with 3.0.8
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi, after upgrading to samba 3.0.8 (debian/unstable, i386) i too encounter similar problems as reported here: http://lists.samba.org/archive/samba/2004-November/095567.html upon logoff from a win2k(sp4) client, the profile cannot be saved and the samba logfile from the client (prinz) gives: [2004/11/26 17:57:06, 2]
2007 Sep 26
0
General question about PHP - continued with mod_python
Oops, I just missed the python part. Does mod_python have similar options? Or how to stop other users to run python scripts in some directories? On 9/26/07, Miskell, Craig <Craig.Miskell at agresearch.co.nz> wrote: > > > > Hello, > > > > Is that possible to disable running of PHP on certain directories? > > I am running a server which provides personal
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:
2010 Sep 08
4
Re-using Rspec Matchers
Hey Everyone, Is it good practice to call matchers from within matchers? Kinda like this pattern: See: http://gist.github.com/570467 -- Brian
2008 Mar 04
2
Matchers tutorial ...
I am looking for a good a - z matchers tutorial . Anyone got a url for one? Thanks Anthony Broad-Crawford -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080303/fd652444/attachment-0001.html
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
2010 Aug 16
0
RSpec 2 matchers 'code-spec' and 'file-spec' released
Spec your generated Ruby code files code-spec at: http://github.com/kristianmandrup/code-spec Spec your file structure (files, dirs, symlinks) file-spec at: http://github.com/kristianmandrup/file-spec More to come...
2013 Sep 07
0
[shoulda-matchers gem] validate_numericality_of_matcher strange behaviour
Hello I have Vacancy model and vacancy_spec test with validates_numericality_of :salary, greater_than: 1 in the model and validate_numericality_of(:salary).is_greater_than(2) in the _spec. When i run rspec spec command tests pass (in some cases and in other they don''t) Why? vacancy.rb ------------------------ class Vacancy < ActiveRecord::Base validates_presence_of :name,