Displaying 5 results from an estimated 5 matches for "be_instance_of".
Did you mean:
an_instance_of
2012 Apr 05
5
rspec: identical tests fails when repeated
I''m doing RSpec controller testing with CanCan authorization, and I''m
seeing something I''ve never seen in RSpec before: the same test run
twice fails on the second one. I am NOT doing before(:all) or other
things that should cause state to persist between tests:
Here''s the relevant code:
context "POST create" do
context "with user logged
2009 Oct 20
8
Stub that returns hash values
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub(''plmSiteItem'', :one => "uno")
To something like this:
@siteItem = stub(''plmSiteItem'', {''one'' => ''uno'', ''two'' => ''dos''} )
So that I can do this:
2007 May 08
4
help with rspec''ing controller
Hi,
I''m a rspec newbie. I''m having trouble with rspec''ing a simple
controller to Create a record.
I''ve tried a couple of approaches and still get errors:
Mock ''remedy'' expected :save! with (any args) once, but received it 0
times
-or-
Mock ''Remedy'' received unexpected message :save with (no args).
Here are my two
2009 Mar 15
0
rspec 1.2.0 Released
...op lib
* added explicit autorun feature for running specs with ruby command
* added handling for does_not_match? for matchers that want to know
the context in which they were called
* lots of ruby 1.9.1 compatibility fixes from Chad Humprhies
* improved feedback from
be_kind_of/be_a_kind_of/be_instance_of/be_an_instance_of (Jakub
????astn??)
* added --format silent (l) option, which is now the default when
running --heckle (Bob Aman)
* sexy new custom matcher creation (Corey Haines & David Chelimsky -
initial concept by Yehuda Katz)
* improved matcher protocol - old one is still supported,...
2007 Aug 04
5
reusable specs - almost there
I have a lot of controllers with virtually identical functionality for most
actions. I''ve been using shared behaviours to DRY things up a bit, but I
still have to create separate behaviours for each context before I can use
the shared behaviours
what I have now is a generic file which contains all the behaviours and
examples common to all the controllers, and that file gets loaded from