search for: uggedal

Displaying 7 results from an estimated 7 matches for "uggedal".

2007 Aug 07
4
Problems with raising errors on a mocked object
...g to mock a object to raise a certain error. By doing so I get a ArgumentError on ActiveRecord''s save! method: http://pastie.caboo.se/85628 I''ve tried to debug it but just can''t seem to find what I''m doing wrong. Any help is greatly appreciated. Cheers, Eivind Uggedal
2006 Apr 22
0
Testing when camping
...e testing facilities of Rails easily be integrated so that I can test my AR models? Functional testing (which seems to me as just another unit test, but of the controllers instead of the models) is not that important to me as the resulting applications hopefully will be quite simplistic. -- Eivind Uggedal http://redflavor.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060422/09497d97/attachment.htm
2007 Sep 15
3
How to write a plugin that uses rspec internally?
My team is working on a plugin and we want to use RSpec internally for the plugin''s tests. (a) What are some different ways to go about this? Should we rely on the RSpec gem? Should we expect that the "host" Rails application has installed the RSpec plugins? Are there other options? (b) Which approach from (a) would you recommend? (c) Would you recommend any particular
2007 Sep 24
3
rcov including ruby lib
When I run spec:rcov on my continuous integration server, the rcov report is including many other libraries in the report, including some from standard lib and gems. Has anyone else had this problem or have any ideas for how to limit it just to coverage of code in app/ and lib/? Thanks, Brandon -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig
2007 Aug 08
5
Can''t seem to spec a ActiveRecord::RecordInvalid exception properly...
1 def create 2 @user = User.new(params[:user]) 3 @user.save! 4 self.current_user = @user 5 redirect_to user_path(@user) 6 flash[:notice] = "Thanks for signing up!" 7 rescue ActiveRecord::RecordInvalid 8 render :action => ''new'' 9 end I can''t seem to properly spec this out. I am trying numerous things, the latest one is
2007 Oct 04
5
Specs and Libs
How would I go about writing specs for a lib, particularly one with all protected and private methods. I''m trying to spec the AuthenticatedSystem library from the rails restful_authentication plugin: http://pastie.caboo.se/103625 Also, when you''re mocking objects, a side-effect is helping you define the api of the object. Is there a way to get all the behaviors that
2007 Sep 03
20
Reason for _spec.rb convention
Hi Easy one - I just wondered why all spec files for rspec_on_rails end "_spec.rb" instead of just ".rb"? They are all inside the spec folder so surely the fact they are specs is implicit? Ashley