Skip to content

Commit

Permalink
cleanedup my boneheaded 'rescue {}'
Browse files Browse the repository at this point in the history
  • Loading branch information
tjennings committed Dec 8, 2009
1 parent aff0269 commit 60d9c38
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/spittle/mtime_tracker.rb
Expand Up @@ -5,7 +5,7 @@ def initialize(dir, options = {})
end

def cleanup
File.delete(mtime_file) rescue {}
File.delete(mtime_file) rescue nil
end

def fresh?
Expand All @@ -30,7 +30,6 @@ def current_mtimes
end

def file_changed?(file)
#puts "#{file} #{mtimes[file]} != #{current_mtimes[file]}"
mtimes[file] != current_mtimes[file]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/spittle/stylesheet_builder.rb
Expand Up @@ -17,6 +17,6 @@ def write
end

def cleanup
File.delete(@output_file) rescue {}
File.delete(@output_file) rescue nil
end
end
2 changes: 1 addition & 1 deletion spec/integration_spec.rb
Expand Up @@ -59,7 +59,7 @@
end

after do
File.delete(@template) rescue {}
File.delete(@template) rescue nil
end

it "should compose class names" do
Expand Down
6 changes: 3 additions & 3 deletions spec/mtime_tracking_spec.rb
Expand Up @@ -10,7 +10,7 @@
end

after do
File.delete(@img_dir + "/.mtimes") rescue {}
File.delete(@img_dir + "/.mtimes") rescue nil
end

it "tells me there are changes" do
Expand All @@ -31,7 +31,7 @@
end

after do
File.delete(@img_dir + "/.mtimes") rescue {}
File.delete(@img_dir + "/.mtimes") rescue nil
end

it "tells me nothing has changed" do
Expand All @@ -57,7 +57,7 @@
end

after do
File.delete(@img_dir + "/.mtimes") rescue {}
File.delete(@img_dir + "/.mtimes") rescue nil
end

it "does not report excluded files as changed" do
Expand Down

0 comments on commit 60d9c38

Please sign in to comment.