On Mar 28, 2011, at 9:59 AM, Stuart Corbishley wrote:
> Hi there,
>
> Does RSpec acknowledge bundler, and use the groups?
RSpec doesn''t really know anything about Bundler''s internals,
but the rake task does look for a Gemfile and shells out to ''bundler
exec rspec'' if it sees one unless you configure the task with
skip_bundler:
RSpec::Core::RakeTask.new(:spec) do |t|
t.skip_bundler = true
end
> Also is there any good example of what is required for a function spec
> rake task...
>
> I''ve had issues trying to create my own.
>
> require ''rubygems''
> require ''bundler''
> Bundler.setup(:default, :test)
>
> begin
> require ''rspec/core/rake_task''
> desc "Run the specs under spec/"
> RSpec::Rake::SpecTask.new
> rescue NameError, LoadError => e
> puts e
> end
>
> I get this back: no such file to load -- rake/tasklib
I''d guess that rake is not in the Gemfile. If this is a Rails app you
don''t need it because rake is a dependency of rails, but if not, you
need to add it yourself.
HTH,
David
> I had a similar issue with another project written by someone else. I
> get the feeling I''m using the RSpec 1.x ways or something of the
sort.
> Any advice?
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
Cheers,
David