similar to: bypass_rescue and its inverse

Displaying 20 results from an estimated 200 matches similar to: "bypass_rescue and its inverse"

2011 Aug 10
5
ControllerExampleGroup.bypass_rescue
As best I can tell, bypass_rescue from rspec-rails-1 is no longer part of rspec-rails, ''> 2''. I had been using it on occasion for things like: describe CorrespondencesController do ... describe ''#show'' do it "should raise an AuthorizationError if current user is not the correspondent " do bypass_rescue ... expect { do_get
2008 Jan 16
2
rspec_on_rails_matchers
All, Sorry for spamming this list about this but I think everyone who could help me with this problem is on this list... If there is a better place to post this question let me know. Anyways, I am trying to use rspec_on_rails_matchers in my rails app to improve my view specs but I can''t get them to work. The helpers for the form tags never seem to be called. I created a new Rails
2009 May 02
10
Problem verifying routing error
Hi, When upgrading to rspec/rspec-rails 1.2.6 gem (from 1.1.12), I''m having a new problem verifying routes that should not exist. This is to support something like this in routes.rb: map.resources :orders do |orders| orders.resources :items, :except => [:index,:show] end I used to use lambda {}.should_raise( routing error ), but it stopped detecting any raised error.
2009 Mar 18
2
Cucumber failing with ''uninitialized constant Spec::Ruby''
I''ve just upgraded RSpec to 1.2 on a Rails 2.2.2 app. rake features fails with the following error: /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ dependencies.rb:442:in `load_missing_constant'': uninitialized constant Spec::Ruby (NameError) from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:77:in
2007 Feb 13
4
Advice on visual graph packages
Hey, all. I'm looking for packages that are good at two things 1) Drawing directed graphs (i.e nodes and edges), both with single and double headed arrows, as well as allowing for differences in line width and solid versus dashed. Note: I've tried Rgraphviz here, but have run into some problems (which seem fixable and I may go with it in the end), and it doesn't satisfy need
2007 Sep 25
12
Problems with expect_render
Hi there, I''ve been working with RSpec for about a week now, and the process of moving from a Test::Unit + Mocha setup to an RSpec + Mocha environment has been pretty straightforward. Except, I''m having problems with using template.expect_render. I have Mocha enabled with: > config.mock_with :mocha in spec_helper. And then I have a view spec which looks like this:
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
2010 Mar 24
2
INCLUDE is broken in pxelinux/menu.c32 3.85
I was trying out the INCLUDE command within menu.c32 (via pxelinux, actually gpxelinux) and noticed that it's broken. The symptom is that the text is included, as expected, but the subsequent text from the including file is wrong. In some cases it actually pulls from above the INCLUDE leading to the INCLUDE being reprocessed (an infinite recursion). (The recursion seems to stop after 20-30
2007 Oct 09
23
Testing layouts with RSpec on Rails
Hey guys, Does anyone have any wisdom to share on the subject of speccing Rails layouts? Most of it''s plain old view specs stuff, but are there sensible ways to verify things like the yield call? (Mocking doesn''t catch that) Thanks, Matt -- Matt Patterson | Design & Code <matt at reprocessed org> | http://www.reprocessed.org/
2007 Sep 06
1
[LLVMdev] Prolog/Epilog Insertion Question
I've been looking through the code for pologue/epilogoue generation and noticed this oddity: void PEI::replaceFrameIndices(MachineFunction &Fn) { [...] for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) { [...] if (I->getOpcode() == FrameSetupOpcode || I->getOpcode() == FrameDestroyOpcode) { [...] } else {
2009 Feb 10
2
rescue_from for NoMethodError
Hi everyone, I was just trying to catch some exceptions in my app, for "Record Not Found" I used this in my application.rb file rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found rescue_from ActionController::NoMethodError, :with => :show_error private def record_not_found render :text => "404 Not Found", :status =>
2008 Apr 30
7
rescue_from issue with AWS - uninitialized constant
The new rescue_from in edge rails seems to conflict with ActionWebService, which I need for various other purposes. When I define, for example (with AWS gem installed): <b>rescue_from ActionController::RoutingError, :with => :page_not_found</b> I get the exception: <b>uninitialized constant ActionWebService::Dispatcher::ActionController::Base</b> OK, so AWS
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall. Thanks to Wilson for converting to the new form. I''ve added a few lines. Basically, it iterates over your model associations and does two things. - First, just try to call the association. Usually fixes speeling erors or other such silliness. - Second, try to find a record with an :include on the association. This
2009 Dec 25
18
rescue_from ActionController::RoutingError II
OK ... so I''m not supposed to use it but ... Why doesn''t rescue_from ActionController::RoutingError work witht he code from http://www.rubyplus.org/episodes/20-Extended-RESTful-Authentication-Rails-2-App.html class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details
2007 Oct 21
7
exact exceptions in rescue_from
rescue_from stores exception class names in a hash table, and associates them with handlers. When an exception is raised there''s a name lookup, and if an entry is found its handler is invoked. In particular rescue_from does not emulate Ruby''s rescue semantics with regard to inheritance. Which is the rationale? Don''t you think taking is_a? and declaration order
2008 Oct 24
1
rescue_from and assert_raise
Since commit 5e3517ea7b9fbd460f772bffc9212d882011f2bc, rescue_from is now being handled in tests. I''ve been using rescue_from to handle custom exceptions and testing that those exceptions are raised in functional tests with assert_raise. This no longer works now. What''s the proper way to test this now? --~--~---------~--~----~------------~-------~--~----~ You received this
2013 Nov 12
7
Hook into Exception Chain
Hi there, I''m using Log4r in my rails projects. On log.error an email is sent using the EmailOutputter. I know changed the EmailOutputter to include a global var in the subject (MDC) since the subject is normally static. I want to set this var to the exception message, so it is sent as the subject. Can anyone tell me how to do this in rails? Basically: raise e or some other cause
2009 Apr 03
0
Truncated development log when using rescue_from
I''m noticing that my development.log messages are not showing the usual complete logging per request/response when I am catching exceptions from my controllers using rescue_from. I was wondering if anyone has ever encountered this issue before. I''m using Rails 2.2.2. Processing DomainsController#show to xml (for 127.0.0.1 at 2009-04-03 16:41:38) [GET] Parameters:
2008 Aug 21
1
rescue_from failing to rescue [from]
Having some weird failures of rescue_from in all my specs. They still rescue in actual usage, just not in my specs. Made a pastie of the code: http://pastie.org/257399 This is with latest [as of 1:00 PM Eastern time zone] rspec/rspec-rails/edge. Thanks in advance for any replies on this. RSL -- Posted via http://www.ruby-forum.com/.
2003 May 11
1
iHEADS UP: ipsec packet filtering change
On Sun, 23 Feb 2003 09:47:05 -0800, "Sam Leffler" <sam@errno.com> said: > >> Add a new config option IPSEC_FILTERGIF to control whether or not >> packets coming out of a GIF tunnel are re-processed by ipfw, >> et. al. By default they are not reprocessed. With the option they >> are. > > This may affect your ipfw/ipf rules. If you are happy with