similar to: Still living dangerously

Displaying 20 results from an estimated 8000 matches similar to: "Still living dangerously"

2006 Sep 29
0
Living Dangerously?
how can I get the benefits of integration testing with Rspec on Rails REL_0_6_3, please? When I first started playing with Rspec on Rails, I hacked spec_helper.rb to include the IntegrationTest interface (diff below) as it was the minimum change I could make to get the the ability to run multiple actions across controllers in my spec. I use it to specify authenticated sessions and stuff.
2007 Jun 12
8
rdebug spec ?
Can you run rdebug on specs? I get errors when I try: $ rdebug spec ./spec/models/select_option_spec.rb ./spec: Is a directory - ./spec (Errno::EISDIR) from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/ rdebug:136:in `debug_load'' from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/ rdebug:136 from /opt/local/bin/rdebug:16:in `load''
2010 Jun 20
0
Debugging a Rails 3 app with RadRails 2?
When trying to debug a Rails 3 app with RadRails 2.0.4, I''m running into a problem with gem loading, apparently. See below for a stack trace. That problem disappears, when I move Gemfile out of the way, but, of course, then other necessary gems aren''t loaded. From my Debug Configuration Project: <myproject> File: script/rails Working Directory:
2007 Oct 08
0
Can''t debug specs in Netbeans
Hi. I can''t seem to get debugging of specs working in Netbeans. AFAIK, I''m supposed to be able to just do Command+Shift+F5 with the spec open in the editor but i get this error: /Users/admin/src/expresso/vendor/plugins/rspec/lib/spec/test/unit/autorunner.rb:2:in `remove_method'': method `process_args'' not defined in Test::Unit::AutoRunner (NameError)
2014 Oct 02
3
debuggingState() analogous to tracingState() ?
We have had some conversation within R core, lead by Duncan Murdoch and me, about a proposal to extend the current tracingState() functionality by something tentatively called debuggingState(). Duncan has allowed me to copy the previous conversation (after very minor editing): The following is quite technical and assumes you know more about R's debug()ing and trace()ing than an estimated
2008 May 22
2
Story / Redirection to static html within public
With a rails application I''m trying to access the public/ folder from within a rspec story. I have a controller which redirects to: /public/static_html_page.html I have a story written using webat. This story uses the above controller and it expects the redirection. This story always fails as within the story it cannot follow the redirection (Always gives a 500 error). It does not
2008 Jan 31
4
reby-debug and rspec
How do I use the ruby debugger with a specific test (not the whole spec file)? I want to do something like this. $ rdebug spec/models/user_spec.rb -s "should error if not new_record" ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search.
2006 Aug 07
0
integration test won''t run
Im trying to write and run integration tests in my app, but they keep failing with an error like "uninitialized constant IntegrationTest" secificly: /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:123:in `const_missing'': uninitialized constant IntegrationTest (NameError) I tried creating a fresh rails app and was able to run an
2007 Dec 29
2
needs to have method `_load'
I''m getting an exception that I''m fairless clueless about. It occurs when I run a "create" action but neither my action or before filters are hit before this exception. I''m hoping someone can give me a clue. I suspect it has to do with marshalling objects in the session - maybe TzTime is not capable of being stored in the session. I hope that''s not the
2007 Mar 31
0
routing problem with controllers in other dirs
Hi all I have a problem with mapping url to controller which is deeper in controller directory (not root directory). I wanted to move acts_as_authenticated account_controller deeper to directory (let''s call it Foo) and route it as /Foo/Account, but i always seem to get exception that no route matched my request file structure: /app +- /controllers +- /Foo +-
2007 May 26
0
New worker not being created
I figured out that in the backgroundrb.yml, I had the old setting of making the database RAILS_ENV. It wasn''t a valid variable in backgroundrb 0.2.1, and it wasn''t reporting an error, so I had no idea. Once I changed it to ''development'' or ''production'', it started working. I found that if a worker has an error, it usually logs the error
2006 Jul 31
1
How do I call a controller from a model, console, or outside of rails?
Hi, I''m writing yet another cms and I need to capture the html output of a rendered template including helpers, etc from within my rails app. I plan to use backgroundrb, and I need to be able to capture the output of "pages.browse()" where pages is my controller. I need to pass in the id param. How can I do this besides using Net::HTTP? Using Net::HTTP hangs when
2006 Apr 04
1
integration tests - 1.1
I?m using the new 1.1 integration test facility? I?m trying to write a test that sees if a controller redirects to the correct place and preserves the query string. Here?s the code: class LoginRedirectTest < ActionController::IntegrationTest def test_non_admin_auth request_uri = "/datafeed/event/report?blah=blah" get(request_uri) follow_redirect!
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
2007 Jul 31
1
anyway to exclude logging for a given IP address?
Hi, im not sure if this is a mongrel or rails question, so im sorry if I got the wrong list. Is there anyway to turn off logging (in production.log) if a request comes from a given IP address. I use monit to watch everything, and I get tons of this in my log file: Processing AccountController#login (for 127.0.0.1 at 2007-07-31 14:06:28) [GET] Session ID: XXXXXXXXXXXXXXXXXX
2007 Oct 16
6
Failure trying to test ApplicationController
I''m trying to write some tests for the ApplicationController as shared tests that can be run in all of my other controller tests, but am getting a nil.rewrite error. Below is what I have... describe AccountController do it_should_behave_like ''Application controller'' end describe ''Application controller'', :shared => true do it
2006 Jul 29
3
Validating two models
Hi, I have a model Account wich "has_one" model called UserData. Both models use validation. # Model contains user name, email etc. class Account < ActiveRecord::Base has_one :user_data, :foreign_key => "user_id" validates_presence_of :email end # Model contains firstname, lastname etc. class UserData < ActiveRecord::Base
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the credit card expiration date, I would like to leave the day field out of the form for obvious reasons. However, the following code is producing an error for me. Any ideas? Thanks! <p><label for="email">Expiration</label><br/> <input type="hidden" id="user_card_expiration_3i"
2007 Jan 09
1
assert_redirected_to not working as expected
I''ve installed the "acts_as_authenticated" plugin and made some modifications to the controller (app/controllers/account_controller.rb) "signup" module as follows: === def signup @page_title = ''Create Account'' @user = User.new(@params[:user]) if request.post? if @user.save session[:user] = User.authenticate(@user.login,
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo are finding the debugger times out once it''s loaded a web page. They don''t run into this in the ruby-debug debugger, or running in normal mode. The reason: Komodo''s debugger is graphical, which means that whenever it hits a breakpoint it automatically shows the contents of each local variable. It has a