spec/cucumber/parser/feature_parser_spec.rb in cucumber-0.6.2 vs spec/cucumber/parser/feature_parser_spec.rb in cucumber-0.6.3
- old
+ new
@@ -1,14 +1,14 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'cucumber/parser/natural_language'
module Cucumber
module Parser
describe Feature do
before do
- @step_mother = StepMother.new
- @parser = NaturalLanguage.get(@step_mother, 'en').parser
+ @step_mother = Cucumber::StepMother.new
+ @parser = Cucumber::Parser::NaturalLanguage.get(@step_mother, 'en').parser
end
after do
NaturalLanguage.instance_variable_set(:@languages, nil) # So that new StepMothers can be created and have adverbs registered
end
@@ -16,14 +16,14 @@
def parse(text)
feature = @parser.parse_or_fail(text)
end
def parse_file(file)
- FeatureFile.new(File.dirname(__FILE__) + "/../treetop_parser/" + file).parse(@step_mother, {})
+ Cucumber::FeatureFile.new(File.dirname(__FILE__) + "/../treetop_parser/" + file).parse(@step_mother, {})
end
def parse_example_file(file)
- FeatureFile.new(File.dirname(__FILE__) + "/../../../examples/" + file).parse(@step_mother, {})
+ Cucumber::FeatureFile.new(File.dirname(__FILE__) + "/../../../examples/" + file).parse(@step_mother, {})
end
describe "Comments" do
it "should parse a file with only a one line comment" do
parse(%{# My comment