Skip to content

Commit

Permalink
Rename all the specs because it's too hard to manage the paths correctly
Browse files Browse the repository at this point in the history
(aka, what does "require 'engine'" pull in?)
  • Loading branch information
anaisbetts committed May 30, 2008
1 parent 33d6ae7 commit b86eee7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ end

desc "Run specifications"
Spec::Rake::SpecTask.new("spec") do |t|
t.spec_files = FileList['spec/**/*.rb']
t.spec_files = FileList['spec/**/spec_*.rb']
end

desc "Run Heckle on tests"
Expand Down
9 changes: 7 additions & 2 deletions build/config.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ unless defined? $CONFIG_INCLUDED and $CONFIG_INCLUDED
# will sometimes cause us to end up with duplicates (i.e. 'test/../lib' and
# 'lib'), and this confuses 'require' and gives us weird errors
def path_add(path)
real_path = Pathname.new(path).realpath
$:.unshift real_path.to_s unless $:.include? real_path
real_path = Pathname.new(path).realpath.to_s
$:.unshift real_path unless $:.include? real_path
path_filter
end

def path_remove(path)
real_path = Pathname.new(path).realpath.to_s
$:.delete_if {|x| Pathname.new(x).realpath.to_s == real_path}
end

def path_filter
tmp = $:.collect do |x|
begin Pathname.new(x).realpath.to_s rescue '' end
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b86eee7

Please sign in to comment.