Displaying 8 results from an estimated 8 matches for "rspec_plugin".
2007 Apr 04
0
rspec_plugin generator
...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 instead of Test::Unit though?
./script/generate rspec_plugin
Yep, it''s super basic, it just does all the same stuff as the regular
plugin generator does, except it creates RSpec stubs for you.
There is one added bonus though, and that''s that you can set up an
individual database for your plugin.
./script/generate rspec_plugin my_plugin -...
2007 Apr 25
9
Running specs for a plugin - undefined method ''define'' for object
...thing 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 vendor/plugins/rspec)
- edge rspec_on_rails (in vendor/plugins/rspec_on_rails)
- I ran script/generate rspec
- plugin created with rspec_plugin (using script/generate rspec_plugin
audit_fu)
File contents of: vendor/plugins/audit_fu/spec/audit_fu_spec.rb
require File.dirname(__FILE__) + ''/spec_helper''
define "Widget" do
fixtures :widgets
it "should find all records" do
Widget.count.should=...
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 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 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 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all,
I feel like I''m missing something really easy and I''m just not seeing
it.
I''m using the restful_authentication plugin and have a User model. Uesr
has_many :things and Thing belongs_to :user.
That''s it.
I did a "script/generate rspec_scaffold thing" to generate all the
necessary bits. The "rake db:migrate" to create the db.
At
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/.
2006 Oct 25
5
Mocha, Stubba and RSpec
Hi,
I''ve been reading with interest the threads trying to integrate Mocha
and Stubba with RSpec. So far, I''ve made the two changes in
spec_helper.rb suggested, but discovered another one that neither of
the archives mentions:
If you use traditional mocking: object = mock or the stub shortcut
: object = stub(:method => :result), you run into namespace conflicts
with