Displaying 4 results from an estimated 4 matches for "dylanegan".
2006 Nov 22
3
Controller Isolation
Hi,
I have a project that I had running under rspec 0.6.x and recently upgraded
to 0.7.2.
I am trying to isolate my controllers from the database as I go through and
change all the specs to run under 0.7.2.
I am having a problem where I need to make the create! method return the
mocked object as well as raise RecordInvalid exception. Is this at all
possible?
I use the rescue statement in my
2007 May 20
9
How to test for exceptions
Hi folks,
I''m in the process of converting a Test::Unit functional test to RSpec, but I''ve run into a slight problem. I tried looking through the documentation but I still don''t know what I missed.
Thanks in advance,
Blake
describe VenuesController, "on update" do
before(:each) do
@venue = mock("venue")
2007 Mar 15
0
Rails Helpers
Hi,
Just trying to spec out my helpers and so far its been working well enough.
I now have a helper as follows
FooHelper
def a
b
end
def b
end
end
But for some reason, probably something really simple, I cant work out how
to spec that a calls b.
Ive looked at all the variables that get set up and tried playing with them,
but no luck.
Maybe someone can shed some light on this
2007 Jan 09
6
rcov seg fault
Hi
Trying to get rcov going (has been working), but with the following context
and specs it fails.
context ''/account POST with invalid attendee'' do
controller_name :account
setup do
Attendee.stub!(:create!).and_raise(ActiveRecord::RecordInvalid.new(
Attendee.new))
end
specify ''should raise on create'' do
Attendee.should_receive(:create!).with({