Displaying 20 results from an estimated 2000 matches similar to: "How to write a plugin that uses rspec internally?"
2007 Aug 07
4
Problems with raising errors on a mocked object
I''m trying 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
2008 Mar 03
2
Testing Plugins + Lib Code
Hi,
I''m quite new to Rspec and I''m embarking on a new project. One thing I''m
really not sure about is how to test plugins and code in your ''lib/''
folder. Where would these specs actually live in the dir structure?
Should you test plugins by creating specs within the plugin''s dir? Or by
adding a spec to the main ''/specs''
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 Jan 19
3
Something cool I learned about rspec today
I found an awesome feature today. When you''re setting expectations,
you can actually pattern match the parameters to methods. Here''s my
discussion and example:
http://evang.eli.st/blog/2007/1/19/parameter-matching-in-rspec
Pat
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 Aug 03
2
Plugins ''speced'' with rSpec?
Hello,
I''m trying to figure out how to setup a spec structure for plugins. I''m
getting pretty lost in figuring out how to isolate a plugin enviornment
emulating rails, but not actually being reflected upon the current rails
project.
What I mean is this, let''s say I have a comment plugin. This has two things
in lib, the comment model (comment.rb) and then the module
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
2005 Mar 15
2
Asterisk Queue strange behaviour
Hi.
I have a problem which I assume would be easy to fix, but I can't find
anything about it...
I wish to have people dialing my phone, and if it is busy, they are put
into a queue. And then I am dialed back when the previous call is
finished, and connected to the waiting caller.
Easy enough?
----------exten
exten => 6,1,Background(salesq-intro);
exten => 6,2,Queue(salesq|tT|||300);
2007 Sep 03
6
blog post on story runner
Here''s an excellent blog post on Story Runner, which will be part of
the next release and is undergoing active development in trunk:
http://evang.eli.st/blog/2007/9/1/user-stories-with-rspec-s-story-runner
2007 Apr 25
9
Running specs for a plugin - undefined method ''define'' for object
I''m trying to write specs for a plugin I''m developing named audit_fu, and
I''m running into a problem which I can''t get past it. I''ve got the same
specs setup in the main rails app, and everything works fine there, it''s
just running the plugin specs that I''m having a problem with. My setup is:
- edge rails
- edge rspec (in
2006 Jan 17
3
Kriging for d>3
Hi,
I'm looking for software that can perform kriging on systems with dimensionality higher than 3, say d=5.
Are anyone aware of packages in R that can do this?
Thanks,
Eivind Sm??rgrav
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use,
2007 Sep 25
2
Testing for particular CSS (i.e. display: none)
I have a page that hides elements using CSS display: none.
I don''t expect RSpec to test any changes made by Javascript; I just want to
test how the page loads initially: what is visible and what is not.
Can I test this in RSpec? Or do I need to use something like Selenium?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Apr 04
2
[PLUGIN] ArPaginator - Allows you to easily paginate over any existing AR queries.
The built-in Rails pagination is fairly limited...you pass in the
model name, and optionally some conditions, and it generates a
paginated query for you. This gets to be very bad if you''ve got any
custom queries.
class Company < ActiveRecord::Base
def complete_videos
Video.find :all, :conditions => "company_id=#{id} AND
status=''complete''", :order
2008 Jun 03
9
Build rspec-rails as a gem?
I can''t figure out how to build rspec-rails as a gem when just cloned
from github... there isn''t any .gemspec file or rake task that does
this. Any help?
--
Posted via http://www.ruby-forum.com/.
2007 Apr 04
0
rspec_plugin generator
I''ve created a couple plugins lately, and have been using RSpec
instead of Test::Unit for them, so I wrote up this little generator.
Also does some isolated database testing if you want as an added
bonus. Basic info:
Rails gives us a generator to create plugins with ./script/generate
plugin. It creates all the stub files, including some tests for you.
What if you want to use RSpec
2005 Jan 12
3
samba across internett
I am quite novise to samba and networking but I have a litle timepressure as I
need two branchoffice to be connected to my server at the mainoffice
Does anyone know if it is possible to do this with samba alone or do I need
somthing extra.
Eivind
2007 Sep 20
10
Getting Started with Story Runner
I haven''t found any How To''s to use story runner and I''m not sure how to get
started.
Should I be looking for resources on how to use rbehave?
How do I generate my first Story?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070920/07a80bc7/attachment.html
2005 Jul 20
3
Working with an ongoing call
Hi list
I plan to implement a prepaid solution where the system needs to check for
remaining credit periodically during a call. The reason for this is that this
is a system where the credit pool can be used simultaneously by more people,
and not only for calling.
I have a problem figuring how to be able to run logic while a call is in
progress. The L(x:y:z) option to Dial() is good, but not
2018 May 18
3
drc, ggplot2, and gridExtra
I have dose response data I have analyzed with the 'drc' package.
Using plot() works great. I want to arrange my plots and source
data on a single page. I think 'gridExtra' is the usual package for
this.
I could use plot() and par(mfrow=...), but then I can't put the source
data table on the page.
gridExtra provides grid.table() which makes nice graphical tables. It
2004 Aug 24
2
Problems with registering new emails - imap/jfs/maildir
After changing a mailserver from using mbox/ext3 (RHL9) to Maildir/jfs
(RHEL 3), dovecot
0.99.10 no longer reports new email even if asked... I have to restart
the mail client and
do a fresh login to notice new email.
This happens with multiple mail clients on multiple platforms, and
didn't happen before the
conversion... any suggestions on workarounds?
--
Trond Eivind Glomsr?d
Senior