[Rspec-devel] Using rspec with rails plugins, engines, etc.
lists-rspec at shopwatch.org
Mon Aug 28 20:16:38 EDT 2006
I'm developing an engine that I'd like to design with rspec. I
generated rspec in the main (stub) application, and then moved the spec
folder to the engine. Some quick modifications to the environment and
fixtures paths in spec_helper.rb got me running, but I'd like to be able
to use rails_spec_runner now that it's working.
I start rails_spec_runner in the main rails dir, and then in a separate
shell I type "script/rails_spec vendor/plugins/myplugin/spec/*". It
mostly works, but the output is a bit noisy; I get some "already
initialized constant" warnings, and the backtrace seems to include all
of drb as well as rspec_on_rails. Specifics below:
$ script/rails_spec vendor/plugins/myplugin/spec/*
already initialized constant RAILS_GEM_VERSION
already initialized constant Major
already initialized constant Minor
already initialized constant Release
Spec::Api::ExpectationNotMetError in 'myplugin class with fixtures
loaded should have more specifications'
not enough specs
have more specifications'
More information about the Rspec-devel