search for: cwdinfo

Displaying 20 results from an estimated 130 matches for "cwdinfo".

2007 May 01
6
rspec and autotest
If you want to use rspec-0.9.2 with autotest (ZenTest-3.5.2), you''ll want to read this blog: http://blog.davidchelimsky.net/articles/2007/05/01/rspec-0-9-1-and-autotest-zentest-3-5-2 Enjoy! David
2006 Jan 31
6
How to Affect Plugin Load Order
I''m using bundled_resource, login_engine, and a few other plugins. It appears Rails considers plugins in alphabetic order. Turns out that there is a particular order that will work and alphabetic ain''t it. The login engine must be loaded first. Bundled resource then includes ''application_helper'' and the application helper includes LoginEngine. If
2007 Mar 19
3
rSpec on Rails Integration Testing
I see that there is an integration testing example in the plugin code. What is the thinking about integration specs? Thanks, Steve
2007 Mar 03
3
ignoring attempt to close td with tr ???
I got the most current rspec and installed as a plugin. Running rake spec:controllers gives me this error: ignoring attempt to close td with tr I dumped response.body and everything looks fine. Is this a known issue? Nothing in Google about it. Thanks, Steve
2007 Aug 30
8
experimental rails story adapter in trunk
For those of you interested in getting a jump on learning about and using the new Story Runner in a Rails app, I''ve added an experimental Rails-Story adapter to trunk. You can see how to use it here: http://pastie.caboo.se/92320 This is PURELY EXPERIMENTAL, however it actually works and will likely not change much in the way that it does work. Happy hacking! David
2006 Dec 04
5
should_be_different -- possible implementation
There is an assert_difference helper for Test::Unit (you can read about it at http://blog.caboo.se/articles/2006/06/13/a-better- assert_difference and to some it should look familiar -- you know who you are :), so I took a shot at one for rSpec on Rails. class Object def should_be_different(method = nil, difference = nil) return self.should_not_eql(yield) if method.nil?
2007 Jan 05
4
How To Spec Controllers with Finders
Given this code (which renders rjs), I''m faced with the fixture- driven way of spec-ing or mocking. How the heck to you mock this so the code at line (2) and (4) work right? I''m still struggling with mocks but it seems like this can be done. Forgive the naivety of this question. 1. def change_quantity 2. @line_item = LineItem.find_by_id(params[:id]) 3. unless
2007 Jan 09
9
Date Approximation in Specs
The floating-point expectations allow for an error tolerance. Is there any similar facility for dates? For example, say I have a custom class that handles date/time spans and I want to spec it: context "A DateRange span" do specify "should know when a week ago is :)" do d = DateRange.new d.last_week.should_be_close_to(1.week.ago, 24*60*60) end end The idea
2007 Aug 23
6
controller spec with model that validates_uniqueness
I want to use mocks and stubs to test the controller, but am having trouble getting my validation not to trigger. Here''s the code: # spec: Image.stub!(:find).and_return(@image) @image.should_receive(:save!).once.with(:any_args) put :update, :id => @image.id, :category_id => @category.id, :image => {:name => ''test'', :image_number =>
2007 May 03
7
before method
Would it be desirable to have before and after take a spec name as well as :each and :all? Scott
2007 Sep 16
12
rspec_todo -- spec''ing backwards
While the spirit of BDD is to spec first and code second, many of us have legacy code. Worse, some of us have legacy code without very good coverage. Recognizing that *I* have such code, I created a script that grinds through your .rb files and creates placeholder specs for each public method. While it is more sensible to spec behavior of code function than of individual methods, this
2006 Feb 24
5
need help with form layout
Is there some way to format the layout of the fields within a form? I''ve got about 10 fields that I''d like to lay out in a couple of columns. Tried putting them in a table and that didn''t work too good. Any pointers will be very much appreciated. Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Apr 30
4
Mocking with Calculated Results
I am setting up an AR mock object and wanted to sanity check it. My intent is to mix this into all my examples and then override/add methods where necessary. Note that I''ve anticipated three cases for find: find with one numeric argument => object find with :all => Array find with anything else => nil This roughly approximates how ActiveRecord::find works in this case
2007 Jun 08
4
Mocha 0.5 released
* Hamcrest-style parameter matchers * Values returned and exceptions raised on consecutive invocations * Yields on consecutive invocations * Multiple yields on single invocation * Invocation dispatch fixed * Deprecated returning result of a Proc -- James. http://blog.floehopper.org
2007 Jan 13
2
svn reorganized?
It appears the repository has been rearranged when compared to the documentation. For the Rails plugin, the correct script/plugin install now seems to be: script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/ rspec_on_rails Is this correct?
2006 Nov 24
2
Bugs Fixed in Trunk
I''m backed off Edge Rails and all the way back to 0.7.2 of rSpec to make my tests pass. The changes to rSpec are coming together fast and furious and they seem too good to pass up. Is there an approved way to upgrade the components in the absence of prebuilt stuff? Every time I''ve tried, I''ve been punished harshly by the Version Conflict Gods. Just asking for
2007 Oct 15
14
Top Quoting?
Sort of off-topic and don''t mean to complain, but many on this list use top quoting. That works ok if you don''t quote the whole previous thread. However, I''m finding that scrolling forever to locate the reply on longer threads is getting tedious. What''s the rationale for top-quoting? Thx.
2006 Oct 25
7
rest nested resources - Help please
I can''t believe I''m back again with another rest question. I did go through the peepcode podcast. I thought though you can have multiple nested resources, is that not true ? I have this set up map.resources :candidates do |candidate| candidate.resources :canbackgrounds candidate.resources :canpositions end I just coded up teh canpositions and now all
2005 Dec 17
4
user engine: Role.count() is zero in tests
Subject pretty much says it all. When user_engine#check_system_roles is called, it discovers that Role.count is zero. However using script/console to execute the same query reveals three users. N.b., this does not happen in the actual application; only when running tests. Any help is appreciated. Thx -- Posted via http://www.ruby-forum.com/.
2008 Dec 10
3
rspecing rjs - form.reset(''form'')
Hello, > > I couldn''t find much info on this. > > How do you rspec this: page.form.reset("form") > > I looked in the have_rjs source code and I can''t find anything on form > reset. > > Thanks, > > -- > Andrei > -------------- next part -------------- An HTML attachment was scrubbed... URL: