diff --git a/lib/cucumber/formatter/junit.rb b/lib/cucumber/formatter/junit.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber/formatter/junit.rb
+++ b/lib/cucumber/formatter/junit.rb
@@ -130,21 +130,19 @@ module Cucumber
         @time += duration
         classname = @feature_name
         name = "#{@scenario}#{suffix}"
-        pending = [:pending, :undefined].include?(status)
-        passed = (status == :passed || (pending && !@options[:strict]))
+        pending = [:pending, :undefined].include?(status) && (!@options[:strict])
 
         @builder.testcase(:classname => classname, :name => name, :time => "%.6f" % duration) do
-          unless passed
+          if status == :skipped || pending
+            @builder.skipped
+            @skipped += 1
+          elsif status != :passed
             @builder.failure(:message => "#{status.to_s} #{name}", :type => status.to_s) do
               @builder.cdata! @output
               @builder.cdata!(format_exception(exception)) if exception
             end
             @failures += 1
           end
-          if passed and (status == :skipped || pending)
-            @builder.skipped
-            @skipped += 1
-          end
           @builder.tag!('system-out')
           @builder.tag!('system-err')
         end
refactoring to make logic more obvious

Conflicts:
	lib/cucumber/formatter/junit.rb