search for: ttono

Displaying 20 results from an estimated 38 matches for "ttono".

2007 Jun 11
12
Mocking system/`
...0, actual calls: 1 And this really shouldn''t work (and doesn''t): Object.expects(:system).with(''ls'') # => #<Mock:0x12f287a>.system(''ls'') - expected calls: 1, actual calls: 0 Anyone have a trick they like? -- Kevin Clark http://glu.ttono.us
2006 Dec 21
4
Stubbing Kernel#open
....google.com/search?q=california'') sent to #<Mocha::Mock: 20045138> 2) Failure: test_new(GoogleSearchTest) [./test/unit/google_search_test.rb:6]: :open(''http://www.google.com/search?q=california''): expected calls: 1, actual calls: 0 -- Kevin Clark http://glu.ttono.us
2006 Sep 03
2
Fwd: Dealing with exec?
...Kernel.stubs(:exec)... doesn''t seem to work but I''m not sure where else an exec call might come from. Ideas? I''m going to push hard to get mocha and stubba into Rails (or atleast allow it for tests on the framework). It just saves me too much work to ignore. http://glu.ttono.us/articles/2006/09/01/the-flexibility-of-mocha -- Kevin Clark http://glu.ttono.us -- James. http://blog.floehopper.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mocha-developer/attachments/20060903/6bec5d6e/attachment.html
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?
..., @return_value=nil, @parameters=** any **, @invoked=4, @method_name=:install>], @stub_everything=false>, @module=#<Module:0x14e0d44>, @helpers=[], @routes={}> This is a big deal because this causes tests to fail in other places in the framework. Ideas? -- Kevin Clark http://glu.ttono.us
2006 Sep 03
1
Returning different values with stubs
...1''} # @session.expects(:get).with(path,args) # @session.stubs(:redirect?).returns() <-- returns different values # @session.expects(:follow_redirect!). <-- expects it a certain amount of times # @session.get_via_redirect(pth, args) # end -- Kevin Clark http://glu.ttono.us
2006 Sep 03
1
Slimmed down version for inclusion in Rails?
...as needed. I haven''t used AutoMocha yet. From what I''ve read I don''t think I''ll need it in core. How difficult would it be to pull Mocha and Stubba into their own package for inclusion in Rails? Do either of them depend on AutoMocha? -- Kevin Clark http://glu.ttono.us
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 Aug 27
6
Rails configuration for sessions
...;s really nothing to identify how that is done. Or even identified in the Rails::Configuration because: -- it''s missing from the installation (no docs?) -- there''s nothing via the internet that I can find which actually specifies session configuration. This does not: http://glu.ttono.us/articles/2006/05/22/configuring-rails-environments-the-cheat-sheet And I can''t find anything that that really discusses how to get configurations done. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups &quo...
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
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 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 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
2006 May 16
0
acts_as_authenticated vs. login_engine
...across a blog entry that claims acts_as_authenticated is the latest and greatest. if anyone has some pros and cons to share, i''d appreciate it -- would like to make the correct choice before we launch our app and get locked in to one or the other. here''s the blog post: http://glu.ttono.us/articles/2006/02/06/rails-best-practices-tips-and-tricks ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
2006 May 30
0
The ARTS Plugin: Another RJS Testing System
...toggle, "post_1", "post_2", "post_3" assert_rjs :visual_effect, :highlight, "posts", :duration => ''1.0'' It also allows for optional content matching on methods where it matters (insert_html et al). A full tutorial is here: http://glu.ttono.us/articles/2006/05/29/guide-test-driven-rjs-with-arts Kev -- Posted via http://www.ruby-forum.com/.
2006 Apr 02
1
Migration Error
Hi All, I am following the useful Migrations tutorial found on this page: http://glu.ttono.us/articles/2005/10/27/the-joy-of-migrations However, when I try to rollback the database schema to version 1 using this command: rake migrate VERSION=1 I get the following error: undefined method `to_str'' for {:noop=>false, :verbose=>true}:Hash I just upgraded to Rails 1.1.0.....
2006 Apr 04
1
San Diego Rails Group?
Anyone in San Diego interested in organizing one?