similar to: San Diego Rails Group?

Displaying 20 results from an estimated 2000 matches similar to: "San Diego Rails Group?"

2008 Feb 02
3
Question abt redirect_to..
I found a reference to using attachment_fu and followed the lead of it but having an issue with the redirect_to that renders the fb:render tag - In my form I''m setting the canvas to false, file is being uploaded / save fine but when I attempt to redirect: redirect_to :action => :new, :canvas => true Unfortunatly it looks like my callback URL is getting printed twice, e.g.
2006 Apr 12
9
Showing Images from a file store
Hi all. I am wrting a small content management tool for my company and was trying to display some images from our file store shown below. <td> <img src="\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"/> The app was displaying the image when it is under the \public\images directory. Is there anything special we need to do to get a file from outside the root of the application? Any help
2007 Jun 11
12
Mocking system/`
This drives me insane on a regular basis. How does one mock system(''blah'') or `blah` ? Adding expectations on Kernel doesn''t do it. Adding expectations on Object just makes me sad: Object.any_instance.expects(:system).with(''ls'') # => #<Mock:0x12b584e>.system(''ls'') - expected calls: 0, actual calls: 1 And this really
2006 Dec 21
4
Stubbing Kernel#open
Anyone know how to stub Kernel#open? I''m trying to mock/stub an open-uri call, but it doesn''t seem to like it. Here''s the test code, and the failures: body = File.open(File.dirname(__FILE__) + ''/../fixtures/google_search_california.html'').read
2006 Sep 03
2
Fwd: Dealing with exec?
---------- Forwarded message ---------- From: Kevin Clark <kevin.clark at gmail.com> Date: 01-Sep-2006 20:31 Subject: Dealing with exec? To: James Mead <jamesmead44 at gmail.com> Hey James, Sorry to bug you. I was curious how you''d handle a call to exec in a method you were testing. Kernel.stubs(:exec)... doesn''t seem to work but I''m not sure where else an
2007 Apr 12
15
Preview of Latest Mocha Changes
I''ve finally managed to find some time to do some serious work on Mocha. There are some code snippets on my blog (http://blog.floehopper.org/articles/2007/04/12/preview-of-latest-mocha-changes) showing the new functionality available in trunk (revision 128). I don''t don''t know how many people out there are using trunk, but it would be great to get some feedback on these
2007 Jan 17
8
Mocha Mock''s hanging on after test run?
Hi guys, I''m running mocha (0.3.2) against Rails core and just found an issue where the mock doesn''t go away after the test is run. For example: def test_reset_bang_doesn_reinstall_named_routes ActionController::Routing::Routes.named_routes.expects(:install).never @session.reset! end def test_zzz puts ActionController::Routing::Routes.named_routes.inspect
2006 Aug 23
2
Re: STI and Joins Broken
I''ve made a inheritance rework some weeks ago that would possible fix it since it only loads the inheritance support in the class that''ll use it. In STI case, it would load only if the class that descends directly from AR has been inherited and the column specified in the inheritance_column is available. People here told me to wait until next release so we can dig into this, but
2006 Mar 07
7
m:n or multiple 1:n?
I have a Newbee question: i have three tables and want to connect them. so is it stupid to make a triple m:n (rails style xs_ys_zs) or do i have to make a new table (newtable) where i got multiple 1:n? the habtm (has and belongs to many) do only work proper to join two tables, or i am wrong? -jens -- Posted via http://www.ruby-forum.com/.
2006 Oct 17
4
Mocking the rendering of a Rails template
Hello all, I''m having difficulty setting up mocks such that I can verify that Rails was going to render the right template file (for example new.rhtml) and stop Rails from performing the actual rendering. After peeking at Rails'' internals, I tried two techniques as illustrated here: http://pastie.caboo.se/18197 Neither worked. I think the first one failed because Rails
2006 Sep 03
1
Returning different values with stubs
Right now I''m working on adding tests to a method that looks like this: def get_via_redirect(path, args={}) get path, args follow_redirect! while redirect? status end So, I want to confirm that get is called and that status is returned but I also want to see that when the value of redirect? effects how many times follow_redirect is called. Is there
2006 Sep 03
1
Slimmed down version for inclusion in Rails?
I''m pushing a major overhaul in testing the Rails codebase. Mocha and stubba make my life easy so that''s what I''m using. The first major patch using them is in RailTies (http://dev.rubyonrails.org/ticket/5970) now. I spoke to DHH today about using it in the other libraries and I think it''ll be ok, but they really want to include as little code as needed. I
2007 Jun 15
2
Is it still possible to use should_have_rjs
Hi I''ve come back to a Rails project after about a month doing other work, and there''s a lot of changes. I was on the 0.7 branch before and I''ve upgraded to RSpec 1.0.5. I used the spec translator, fixed the cases where it barfed on unusual line contents, and all my model and controller specs now pass. But I''m getting 53 failures on my view specs,
2006 Aug 27
6
Rails configuration for sessions
I''m trying to get the configuration done for sessions but I can''t seem to find any documentation on how to do it beyond the merest of basics. I would rather have something that would NOT persist a marshalled object to the database since that''s just not something I want to do. I want to be able to read the data for one. But there''s really nothing to
2006 Oct 06
8
Expecting calls with two different parameters
Hello, I''ve just started using Mocha in the tests for my Rails app, and I''ve run across an issue with mocking a method that should be called with different parameters. How would I setup a mock that expects that a method will be called once with no paramaters, and a second time with a parameter? I''d be tempted to shortcut and just do something like
2007 Feb 07
2
Problems Generating Scaffolding
I am having trouble generating some of my scaffolding. I''m trying to use PostgreSQL as my back-end. Some of my scaffolding generates with no problem but for other parts I get this: Before updating scaffolding from new DB schema, try creating a table for your model The tables do exist. At least I can see them from psql. Here is the SQL I''m using to create my tables: CREATE
2006 Feb 19
8
SwitchTower to skip config/ directory
Hello, I am trying to figure out how to use switch tower.I have a local copy of source code and I want to put it on the host.Now I dont want to put directories like config/ because the settings on the host and the one on my machine are different. Any way to do this? Also is svn necessary to use SwitchTower? Vivek -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Aug 04
3
forms and relationships
i''m still pretty new to rails, and while i''ve been able to hack my way into having it do what i want so far, i''m not happy with the way my code looks. on top of that, i''m sure that what i''m doing prlly isn''t the most efficient either. one of my biggest problems is probably to do with using relationships and forms together. i''ve
2006 Jun 07
1
Question: Writing migration code
Just started learning on rails. The first few time I edited a migration file it was using colons like: create_table :table do |t| t.column :column, :string Now I''m working on a tutorial where it''s using quotes for the table and column names: reate_table "table" do |t| t.column "column", :string Are these two ways interchangeable ? Is there a
2007 Jun 19
4
Changing the value of $?
Hi :) Does anyone know of a way to set the value of $? ? I have a test which stubs ` ; the call works fine, but then the library I am testing checks the value of $? to see if the process terminated correctly. It seems not to be possible to assign $? directly... For now I do this before my test : `ls > /dev/null` Which ensure that $? is zero ; but this is not a very nice way of doing it !