spec/cucumber/formatter/junit_spec.rb in cucumber-0.4.2 vs spec/cucumber/formatter/junit_spec.rb in cucumber-0.4.3
- old
+ new
@@ -20,9 +20,20 @@
before(:each) do
File.stub!(:directory?).and_return(true)
@formatter = TestDoubleJunitFormatter.new(step_mother, '', {})
end
+
+ describe "a feature with no name" do
+ define_feature <<-FEATURE
+ Scenario: Passing
+ Given a passing scenario
+ FEATURE
+
+ it "should raise an exception" do
+ lambda { run_defined_feature }.should raise_error(Junit::UnNamedFeatureError)
+ end
+ end
describe "given a single feature" do
before(:each) do
run_defined_feature
@doc = Nokogiri.XML(@formatter.written_files.values.first)
\ No newline at end of file