search for: jonathanleighton

Displaying 20 results from an estimated 21 matches for "jonathanleighton".

2010 Sep 17
3
How to create a project with an older version of rails
Hi, I have installed Rails 3 on my local machine. Let''s say I wan''t to create a new project but in version 2.3.5, can I do that? Greg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2011 Sep 25
2
Noob Rails patcher - problems running the sqlite3 tests...
Hi, I am following the guide here: http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html I have an ubuntu 11.04 VM setup, installed rvm, and ruby (ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]). Pulled down the rails from github and created a 3.0 branch: $ git branch --track 3-0-stable origin/3-0-stable $ git checkout 3-0-stable I can run the non-db tests ok, all pass
2007 Aug 21
7
mocking singletons
How can I safely mock a singleton without the mocked method living on outside the scope of the test method? I''ve run into this problem with mocking methods on globals (gasp!) in the past by doing something like def mock_my_global original = $my_global $my_global.expects(:foo).returns(''bar'') yield $my_global = original end Is there something similar I
2011 Mar 22
3
Rails 3.0.6 ETA?
Hello, Is there some Rails 3.0.6 ETA? I am asking because there are some security holes in Rails 3.0.3, which are currently available in Fedora 15. So is it right time to update Rails to 3.0.5 or is it worth of waiting for 3.0.6? Vit -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to
2007 Dec 21
4
StoryRunner docs/guidance
...ctly what things are appropriate to test at that level (this might be exacerbated by the fact that I''ve never really used integration testing that much). A full example of testing a Rails controller would be extremely useful to me. Thanks, Jon -- Jonathan Leighton, Web Developer http://jonathanleighton.com/
2007 Jun 17
2
Testing a call to super
Hi, Is there or could there be any way to test that a method calls "super"? Thanks -- Jonathan Leighton, Web Developer http://jonathanleighton.com/
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/ shoulda/) on a project and I saw some things that would be really nice to see in rspec, namely the should_ methods, and especially the should_be_restful method. Do these go against the rspec goals at all? Or could an ambitious programmer go to town implementing these for rspec_on_rails? Nathan Sutton fowlduck at
2007 Oct 25
4
Insure a method is called with no arguments.
We''ve been working with the ParameterMatchers (so cool!) but I don''t see a way to insure a method is called with no arguments. I imagined something like: user = mock(''User'') user.expects(:friends).with(nothing) Anyone run into this?
2007 Jul 16
4
Set the return value to "same as block"
...e of the block is not the contents of the file): def my_method open("/path/to/file", "r") do |file| file.read puts "Stolid in my guilt, clutching it like a girl with a stuffed bunny, I failed to follow." end end -- Jonathan Leighton, Web Developer http://jonathanleighton.com/
2011 Feb 11
11
CSRF protection in rails 2.3.11
Hi all, I think CSFR protection broke in rails 2.3.11. As in: it''s turned off now. I tried this in rails 2.3.10 and in 2.3.11 and 2.3.11 seems broken. >rails csrftest >cd csrftest >script/generate scaffold post title:string >rake db:migrate now I visit /posts/new in my browser, use firebug to delete or change the authenticity token, and submit the form. rails 2.3.11: all
2005 Dec 28
0
Testing class variables
...unit test, class variables do not get "reloaded" between tests like everything else. Is there any way to make them "reload" (I would have though given the nature of tests that would be the default behaviour). Many Thanks -- Jonathan Leighton http://turnipspatch.com/ | http://jonathanleighton.com/ | http://digital-proof.org/
2007 Jan 19
2
Rails Deploy Files - Remove?
So, now that we''re using Mongrel and not the horrid FCGI, do I really need these files in my Rails apps: dispatch.fcgi dispatch.cgi .htaccess ?? The .htaccess file has rules for rewriting that look FCGI based. For Mongrel, I do my Apache re-writing in my config file, right? is there a reason to include these files at this point? Hunter
2011 Nov 14
0
Rails 3.1.2.rc2
...mits between the versions on Github: * https://github.com/rails/rails/compare/v3.1.1...v3.1.2.rc2 And you can see the issues we haven''t closed: * https://github.com/rails/rails/issues?sort=created&direction=desc&state=open&page=1&milestone=8 Cheers, Jon -- http://jonathanleighton.com/
2012 Jul 17
1
AR deprecated finders
Hi all, I had troubles while running tests on Active Record: bundle exec rake test_sqlite3 /Users/oscardelben/code/rails/activesupport/lib/active_support/core_ext/hash/keys.rb:70:in `block in assert_valid_keys'': Unknown key: extend (ArgumentError) This is because some models used by tests are using the extend option which now seems deprecated. Should related tests be
2012 Apr 07
3
Is require_dependency supposed to be a public API?
If so, shouldn''t it be documented in the Rails API? Or is there a better way to allow class reloading of my files under lib. I mean, I know about config.autoload_paths, but I want to be explicit about my requires. I just want to be able to reload then on each request when I''m working on them. require_dependency seems to do just that but I''m worried since it is not
2011 Sep 08
4
In Rails 3.1 Model.count() ignores :include - no outer join in generated SQL
Hello! At first I posted this in rubyonrails-talk, but no one there was able to tell me if this is a bug or not (I got only suggestion for workaround). As this looks like 3.1 regression that breaks existing 3.0.10 code I decided to post this here in addition. I''ve upgraded to Rails 3.1 (from 3.0.10), ran my test suite and found this issue: class Trade < ActiveRecord::Base
2011 Feb 09
2
CSRF Protection Bypass in Ruby on Rails - I don't get it ...
Hi all, My team and I are finding ourselves a little in the dark about the "CSRF Protection Bypass in Ruby on Rails" vulnerability that was announced yesterday - http://weblog.rubyonrails.org/2011/2/8/csrf-protection-bypass-in-ruby-on-rails 1. Where is the complete Advisory? The Impact section is very unclear. Looking at the comment in the 2.3 patch mentions "Flash animations and
2010 Sep 17
6
Rails base model
I''m very new to Ruby and to Rails. I''m coming from PHP and CakePHP. I would like to create a base model from which all other models will inherit from. I have done this: class AppModel < ActiveRecord::Base end and class Post < AppModel end I''m getting the following error: Table ''blog_development.app_models'' doesn''t exist My
2012 Jul 24
4
Behavior of first_or_create
I just ran across a weird glitch (IMHO) in find_or_create. The arguments passed to it are *not* added to the conditions for the ''first'' part. This is odd, given that it''s intended to replace find_or_create_by_* methods, which *did* use the specified values as conditions. I''m unsure on whether this behavior is entirely undesirable, but it''s definitely
2006 Dec 21
6
Rails'' send_file, Mongrel, and *gasp* memory
...teracts with Rails? If so, I gave it a try under lighttpd and still had the problem, any idea why? I''m really just looking to understand the issue better as I hate to walk away from a problem without fully comprehending it :) Thanks, -- Jonathan Leighton, Web Developer Portfolio: http://jonathanleighton.com/ Personal: http://turnipspatch.com/