[rspec-devel] [ rspec-Bugs-12448 ] The spec:plugins rake task from rspec_on_rails should ignore specs from the rspec_on_rails plugin

noreply at rubyforge.org noreply at rubyforge.org
Fri Jul 20 10:05:29 EDT 2007


Bugs item #12448, was opened at 2007-07-20 13:51
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12448&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: James Adam (lazyatom)
Assigned to: Nobody (None)
Summary: The spec:plugins rake task from rspec_on_rails should ignore specs from the rspec_on_rails plugin

Initial Comment:
It's a simple fix - change:

t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*')

to t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude('vendor/plugins/rspec_on_rails/*')

in rspec_on_rails/tasks/rspec.rake

----------------------------------------------------------------------

>Comment By: James Adam (lazyatom)
Date: 2007-07-20 14:05

Message:
How about this:

  desc "Run the specs under vendor/plugins (except RSpec's own)"
  Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t|
    t.spec_opts = ['--options',
"\#{RAILS_ROOT}/spec/spec.opts\"]
    t.spec_files =
FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec_on_rails/*")
  end

  namespace :plugins do
    desc "Run the specs under vendor/plugins (including
RSpec's own)"
    Spec::Rake::SpecTask.new(:all => spec_prereq) do |t|
      t.spec_opts = ['--options',
"\#{RAILS_ROOT}/spec/spec.opts\"]
      t.spec_files =
FileList['vendor/plugins/**/spec/**/*_spec.rb']      
    end
  end

I'm not sure of your exact workflow when developing and
testing these plugins, but those are the two edge cases
covered -

  rake spec:plugins -- when you are developing using rspec;
  rake spec:plugins:all -- when you are developing rspec itself.

Another approach would be to add a flag, but this seemed
simpler in the short term.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-07-20 13:57

Message:
Not quite so simple. We need to make sure they run when we're making changes to the plugin. So we need a strategy for ensuring that it runs when we want it to, and not when we don't.

Not a big problem to solve. It's just been very low on our list of priorities.

If you have an idea of how to solve it and wish to submit a patch, we would welcome it. Otherwise this one might be a while off.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12448&group_id=797


More information about the rspec-devel mailing list