Skip to content

Commit

Permalink
Don't include Rake::DSL at the top level, but in the task itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jun 20, 2011
1 parent e198713 commit 33c851b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/cucumber/platform.rb
Expand Up @@ -4,7 +4,7 @@

module Cucumber
unless defined?(Cucumber::VERSION)
VERSION = '0.10.7'
VERSION = '1.0.0'
BINARY = File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
LIBDIR = File.expand_path(File.dirname(__FILE__) + '/../../lib')
JRUBY = defined?(JRUBY_VERSION)
Expand Down
14 changes: 7 additions & 7 deletions lib/cucumber/rake/task.rb
@@ -1,13 +1,6 @@
require 'cucumber/platform'
require 'gherkin/formatter/ansi_escapes'

begin
# Support Rake > 0.8.7
require 'rake/dsl_definition'
include Rake::DSL
rescue LoadError
end

module Cucumber
module Rake
# Defines a Rake task for running features.
Expand Down Expand Up @@ -35,6 +28,13 @@ module Rake
class Task
include Gherkin::Formatter::AnsiEscapes

begin
# Support Rake > 0.8.7
require 'rake/dsl_definition'
include ::Rake::DSL if defined?(::Rake::DSL)
rescue LoadError
end

class InProcessCucumberRunner #:nodoc:
attr_reader :args

Expand Down
4 changes: 2 additions & 2 deletions spec/cucumber/rake/forked_spec.rb
Expand Up @@ -24,7 +24,7 @@ module Rake
end

it "uses bundle exec to find cucumber and libraries" do
subject.cmd.should == [RUBY,
subject.cmd.should == [Cucumber::RUBY_BINARY,
'-S',
'bundle',
'exec',
Expand All @@ -46,7 +46,7 @@ module Rake
end

it "uses well known cucumber location and specified libraries" do
subject.cmd.should == [RUBY,
subject.cmd.should == [Cucumber::RUBY_BINARY,
"-I",
"\"lib\"",
"\"#{Cucumber::BINARY }\"",
Expand Down
4 changes: 2 additions & 2 deletions spec/cucumber/rake/rcov_spec.rb
Expand Up @@ -26,7 +26,7 @@ module Rake
end

it "uses bundle exec to find cucumber and libraries" do
subject.cmd.should == [RUBY,
subject.cmd.should == [Cucumber::RUBY_BINARY,
'-S',
'bundle',
'exec',
Expand All @@ -51,7 +51,7 @@ module Rake
end

it "uses well known cucumber location and specified libraries" do
subject.cmd.should == [RUBY,
subject.cmd.should == [Cucumber::RUBY_BINARY,
'-I',
'"lib"',
'-S',
Expand Down

0 comments on commit 33c851b

Please sign in to comment.