lib/cucumber/parser.rb in aslakhellesoy-cucumber-0.1.99.14 vs lib/cucumber/parser.rb in aslakhellesoy-cucumber-0.1.99.15
- old
+ new
@@ -24,10 +24,11 @@
end
class Loader
def initialize(keywords)
@keywords = keywords
- template = File.open(File.dirname(__FILE__) + "/parser/i18n.tt", Cucumber.file_mode('r')).read
+ i18n_tt = File.expand_path(File.dirname(__FILE__) + '/parser/i18n.tt')
+ template = File.open(i18n_tt, Cucumber.file_mode('r')).read
erb = ERB.new(template)
grammar = erb.result(binding)
Treetop.load_from_string(grammar)
require 'cucumber/parser/feature'
end
\ No newline at end of file