Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
Moved caching of RspecWorld methods to class level- I realized that the
Browse files Browse the repository at this point in the history
instance level caching buys us nothing.
  • Loading branch information
bmabey committed Mar 30, 2009
1 parent fd0d942 commit c1471c8
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions features/support/env.rb
Expand Up @@ -15,12 +15,31 @@ def self.working_dir
@working_dir ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../tmp/cucumber-generated-files"))
end

def self.spec_command
@spec_command ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../bin/spec"))
end

def self.cmdline_file
@cmdline_file ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../resources/helpers/cmdline.rb"))
end
def self.rspec_lib
@rspec_lib ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../lib"))
end

def working_dir
self.class.working_dir
end

def spec_command
self.class.spec_command
end

def cmdline_file
self.class.cmdline_file
end

def rspec_lib
@rspec_lib ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../lib"))
self.class.rspec_lib
end

def spec(args)
Expand Down Expand Up @@ -59,13 +78,6 @@ def ruby(args)
@exit_code = $?.to_i
end

def spec_command
@spec_command ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../bin/spec"))
end

def cmdline_file
@cmdline_file ||= File.expand_path(File.join(File.dirname(__FILE__), "/../../resources/helpers/cmdline.rb"))
end

end

Expand Down

0 comments on commit c1471c8

Please sign in to comment.