MattR
2011-Jun-03 17:20 UTC
[rspec-users] rspec1.3.2/rspec-rails1.3.4 and Rake 0.9.1 = lots of deprecation warnings
Hi folks,
I''ve been searching google and I don''t think this case has yet
been
identified. I''ve got an older, Rails 2.3 app that is using rspec 1.3.x.
We
upgraded Rake to 0.9.1, and now I get tons of deprecation warnings on
lib/tasks/rspec.rake:28:
WARNING: Global access to Rake DSL methods is deprecated. Please Include
Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Spec::Rake::SpecTask#task
<spec::Rake::SpecTask%23task>called at lib/tasks/rspec.
rake:28:in `initialize''
I tried adding include Rake::DSL in the class that is monkeypatched, but it
doesn''t work (unknown constant etc.). Any ideas? Thanks!!
begin
require ''spec/rake/spectask''
rescue MissingSourceFile
module Spec
module Rake
class SpecTask
# I added it here
def initialize(name)
--
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/rspec-users/attachments/20110603/884d4419/attachment.html>
David Chelimsky
2011-Jun-04 15:11 UTC
[rspec-users] rspec1.3.2/rspec-rails1.3.4 and Rake 0.9.1 = lots of deprecation warnings
On Jun 3, 2011, at 12:20 PM, MattR wrote:> Hi folks, > > I''ve been searching google and I don''t think this case has yet been identified. I''ve got an older, Rails 2.3 app that is using rspec 1.3.x. We upgraded Rake to 0.9.1, and now I get tons of deprecation warnings on lib/tasks/rspec.rake:28: > > WARNING: Global access to Rake DSL methods is deprecated. Please Include Rake::DSL into classes and modules which use the Rake DSL methods. > WARNING: DSL method Spec::Rake::SpecTask#task called at lib/tasks/rspec.rake:28:in `initialize'' > > I tried adding include Rake::DSL in the class that is monkeypatched, but it doesn''t work (unknown constant etc.). Any ideas? Thanks!! > > begin > require ''spec/rake/spectask'' > rescue MissingSourceFile > module Spec > module Rake > class SpecTask > # I added it here > def initialize(name) >Please report this to the rspec-rails tracker (for 1.x): http://github.com/dchelimsky/rspec-rails/issues. Thx -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110604/db5c1892/attachment.html>
Ramon Tayag
2011-Jun-04 16:59 UTC
[rspec-users] rspec1.3.2/rspec-rails1.3.4 and Rake 0.9.1 = lots of deprecation warnings
Sounds like it doesn''t know how to load rake. Try require
''rake'' or
something like that on top.
Ramon Tayag
On Jun 4, 2011, at 22:58, MattR <matt.rogish at gmail.com> wrote:
Hi folks,
I''ve been searching google and I don''t think this case has yet
been
identified. I''ve got an older, Rails 2.3 app that is using rspec 1.3.x.
We
upgraded Rake to 0.9.1, and now I get tons of deprecation warnings on
lib/tasks/rspec.rake:28:
WARNING: Global access to Rake DSL methods is deprecated. Please Include
Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Spec::Rake::SpecTask#task
<spec::Rake::SpecTask%23task>called at lib/tasks/rspec.
rake:28:in `initialize''
I tried adding include Rake::DSL in the class that is monkeypatched, but it
doesn''t work (unknown constant etc.). Any ideas? Thanks!!
begin
require ''spec/rake/spectask''
rescue MissingSourceFile
module Spec
module Rake
class SpecTask
# I added it here
def initialize(name)
--
Matt
_______________________________________________
rspec-users mailing list
rspec-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/rspec-users/attachments/20110605/bd72cd30/attachment.html>