Hmm.. That is odd that you are seeing that warning without using
#step_pattern= in your task... Very odd. I can't really explain why you
are seeing that without stepping through the code. The warning should
only be issued when you use #step_pattern= Here is the code
(lib/cucumber/task.rb:88-96):
def self.deprecate_accessor(attribute) # :nodoc:
attr_reader attribute
class_eval <<-EOF, __FILE__, __LINE__ + 1
def #{attribute}=(value)
@#{attribute} = value
warn("\nWARNING: Cucumber::Rake::Task##{attribute} is
deprecated and will be removed in 0.4.0. Please use profiles for
complex settings:
http://wiki.github.com/aslakhellesoy/cucumber/using-rake#profiles\n")
end
EOF
end
Would you mind stepping though to see who is using the #step_pattern=
method? That is the only way we can figure out how to avoid the message.
-Ben
If they don't want to use profiles I would suggest just using the following:
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = '--format pretty --require lib/steps test/features"
end
FYI, the motivation for deprecating these accessors on the Rake task is to avoid duplication of logic in Cucumber, simplify the rake task logic, and encourage people to use the powerful command line options instead (in conjunction with profiles when appropriate).
-Ben