Permalink
Browse files

Ruby 1.8 compatibility fixes

* Use old hash syntax
* Use `Pathname#realpath` instead of `File.realpath`
  • Loading branch information...
1 parent bb8a8ce commit e3849403a901a7baeca53d95a2c99f2aaddc1766 Ian Lesperance committed Sep 14, 2012
View
@@ -18,4 +18,4 @@ Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format pretty"
end
-task default: [:spec, :features]
+task :default => [:spec, :features]
@@ -281,7 +281,7 @@ def reset_projects!
end
def root_path
- File.realpath(File.join(File.dirname(__FILE__), "..", ".."))
+ Pathname.new(File.join(File.dirname(__FILE__), "..", "..")).realpath.to_s
end
end
end
@@ -10,7 +10,7 @@ def file_path
end
def full_file_path
- @file_path.realpath.to_s
+ Pathname.new(@file_path).realpath.to_s
end
def file_name
@@ -14,7 +14,7 @@
end
def fixture_path(fixture)
- File.realpath(File.join(File.dirname(__FILE__), '..', '..', '..', 'spec', 'fixtures', fixture))
+ Pathname.new(File.join(File.dirname(__FILE__), '..', '..', '..', 'spec', 'fixtures', fixture)).realpath.to_s
end
its(:name) { should == 'spec_name 2.1.3' }

0 comments on commit e384940

Please sign in to comment.