search for: should_be_instance_of

Displaying 2 results from an estimated 2 matches for "should_be_instance_of".

2006 Nov 21
6
Spec Naming (was: Rspec Brown Bag)
...re confidently without it -- the spec doc says, "this is the way things are" rather than "this is kinda sorta maybe how the system works (if there are no bugs)". context "A user purchasing items" do specify "creates an order" do @user.complete_purchase.should_be_instance_of Order end # ... end It''s just a matter of taste in the end, I suppose, but is there a recommended practice for naming specs? Cheers, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20061121/5...
2006 Sep 29
0
Living Dangerously?
...39;t know what I was doing, but it seemed to work. Today it bit me. I most-always run my specs separately so I know what''s failed but today I was doing some regression testing so ran rake spec:controllers for the first time (gasp!). Specs started to fail on the basic "controller.should_be_instance_of ...": <ApreviousController> should be an instance of <ThisNewController> A simple trace in lib/rspec_on_rails.rb (around lines 43-48) shows the following... >>>>>looking for AccountController >>>>>found #<AccountController:0xb74cff20> (nex...