Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rubygems'
require 'rake'

require 'lib/sandbox' unless defined? Sandbox
require_relative 'lib/sandbox' unless defined? Sandbox

begin
require 'echoe'
Expand Down Expand Up @@ -57,7 +57,7 @@ Dir[ "#{File.dirname(__FILE__)}/tasks/*.rake" ].sort.each { |ext| load ext }
# rdoc.rdoc_files.add( files )
# rdoc.main = "README" # page to start on
# rdoc.title = "sandbox"
# # rdoc.template = File.exists?( t="/Users/chris/ruby/projects/err/rock/template.rb" ) ? t : "/var/www/rock/template.rb"
# # rdoc.template = File.exist?( t="/Users/chris/ruby/projects/err/rock/template.rb" ) ? t : "/var/www/rock/template.rb"
# rdoc.rdoc_dir = 'doc' # rdoc output folder
# rdoc.options << '--inline-source'
# end
8 changes: 4 additions & 4 deletions features/steps/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def setup_active_project_folder project_name

Then %r{^folder '(.*)' is created} do |folder|
in_project_folder do
File.exists?(folder).should be_true
File.exist?(folder).should be_true
end
end

Then %r{^file '(.*)' (is|is not) created} do |file, is|
in_project_folder do
File.exists?(file).should(is == 'is' ? be_true : be_false)
File.exist?(file).should(is == 'is' ? be_true : be_false)
end
end

Expand All @@ -87,8 +87,8 @@ def setup_active_project_folder project_name
end

Then %r{gem file '(.*)' and generated file '(.*)' should be the same} do |gem_file, project_file|
File.exists?(gem_file).should be_true
File.exists?(project_file).should be_true
File.exist?(gem_file).should be_true
File.exist?(project_file).should be_true
gem_file_contents = File.read(File.dirname(__FILE__) + "/../../#{gem_file}")
project_file_contents = File.read(File.join(@active_project_folder, project_file))
project_file_contents.should == gem_file_contents
Expand Down
4 changes: 2 additions & 2 deletions lib/sandbox/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def restore_sandbox_env
def resolve_target( path )
# should consider replacing with 'pathname' => Pathname.new( path )
path = fix_path( path )
if File.exists?( path )
if File.exist?( path )
raise Sandbox::Error, "target '#{path}' exists"
end

Expand All @@ -153,7 +153,7 @@ def check_path!( path )
else
raise Sandbox::Error, "path '#{path}' has a permission problem"
end
elsif File.exists?( path )
elsif File.exist?( path )
raise Sandbox::Error, "path '#{path}' is not a directory"
end
false
Expand Down