Skip to content
This repository

Identified issues with JRuby RSpec failures and marked them as pending under java. #274

Merged
merged 3 commits into from almost 2 years ago

2 participants

Andrew Kiellor Matt Wynne
Andrew Kiellor

This should make the 1.6.5 and 1.6.6 build pass. 1.6.7 still has some unicode issues I'm tracking down.

Matt Wynne mattwynne merged commit 6ed5f60 into from April 26, 2012
Matt Wynne mattwynne closed this April 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
14  spec/cucumber/cli/configuration_spec.rb
@@ -404,14 +404,20 @@ def reset_config
404 404
     end
405 405
     
406 406
     describe "#tag_expression" do
  407
+      include RSpec::WorkInProgress
  408
+
407 409
       it "returns an empty expression when no tags are specified" do
408  
-        config.parse!([])
409  
-        config.tag_expression.should be_empty
  410
+        pending_under :java, 'the java class Gherkin::TagExpression has no isEmpty method' do
  411
+          config.parse!([])
  412
+          config.tag_expression.should be_empty
  413
+        end
410 414
       end
411 415
 
412 416
       it "returns an expression when tags are specified" do
413  
-        config.parse!(['--tags','@foo'])
414  
-        config.tag_expression.should_not be_empty
  417
+        pending_under :java, 'the java class Gherkin::TagExpression has no isEmpty method' do
  418
+          config.parse!(['--tags','@foo'])
  419
+          config.tag_expression.should_not be_empty
  420
+        end
415 421
       end
416 422
     end
417 423
     
12  spec/cucumber/cli/options_spec.rb
@@ -55,14 +55,20 @@ def after_parsing(args)
55 55
 
56 56
       context '--i18n' do
57 57
         context "with LANG specified as 'help'" do
  58
+          include RSpec::WorkInProgress
  59
+
58 60
           it "lists all known langues" do
59  
-            when_parsing '--i18n help' do
60  
-              Kernel.should_receive(:exit)
  61
+            pending_under :java, "require gherkin >= b5e96f13" do
  62
+              when_parsing '--i18n help' do
  63
+                Kernel.should_receive(:exit)
  64
+              end
61 65
             end
62 66
           end
63 67
 
64 68
           it "exits the program" do
65  
-            when_parsing('--i18n help') { Kernel.should_receive(:exit) }
  69
+            pending_under :java, "require gherkin >= b5e96f13" do
  70
+              when_parsing('--i18n help') { Kernel.should_receive(:exit) }
  71
+            end
66 72
           end
67 73
         end
68 74
       end
8  spec/cucumber/rb_support/regexp_argument_matcher_spec.rb
@@ -4,14 +4,18 @@
4 4
 module Cucumber
5 5
   module RbSupport
6 6
     describe RegexpArgumentMatcher do
  7
+      include RSpec::WorkInProgress
  8
+
7 9
       it "should create 2 arguments" do
8 10
         arguments = RegexpArgumentMatcher.arguments_from(/I (\w+) (\w+)/, "I like fish")
9 11
         arguments.map{|argument| [argument.val, argument.offset]}.should == [["like", 2], ["fish", 7]]
10 12
       end
11 13
 
12 14
       it "should create 2 arguments when first group is optional" do
13  
-        arguments = RegexpArgumentMatcher.arguments_from(/should( not)? be flashed '([^']*?)'$/, "I should be flashed 'Login failed.'")
14  
-        arguments.map{|argument| [argument.val, argument.offset]}.should == [[nil, nil], ["Login failed.", 21]]
  15
+        pending_under :java, "requires cucumber/gherkin >= ac42f51" do
  16
+          arguments = RegexpArgumentMatcher.arguments_from(/should( not)? be flashed '([^']*?)'$/, "I should be flashed 'Login failed.'")
  17
+          arguments.map{|argument| [argument.val, argument.offset]}.should == [[nil, nil], ["Login failed.", 21]]
  18
+        end
15 19
       end
16 20
     end
17 21
   end
8  spec/cucumber/step_match_spec.rb
@@ -5,6 +5,8 @@
5 5
 
6 6
 module Cucumber
7 7
   describe StepMatch do
  8
+    include RSpec::WorkInProgress
  9
+    
8 10
     WORD = Cucumber::RUBY_1_9 ? '[[:word:]]' : '\w'
9 11
 
10 12
     before do
@@ -57,8 +59,10 @@ def step_match(regexp, name)
57 59
     end
58 60
 
59 61
     it "should format groups even when first group is optional and not matched" do
60  
-      m = step_match(/should( not)? be flashed '([^']*?)'$/, "I should be flashed 'Login failed.'")
61  
-      m.format_args("<span>%s</span>").should == "I should be flashed '<span>Login failed.</span>'"
  62
+      pending_under :java, "requires cucumber/gherkin >= ac42f51" do
  63
+        m = step_match(/should( not)? be flashed '([^']*?)'$/, "I should be flashed 'Login failed.'")
  64
+        m.format_args("<span>%s</span>").should == "I should be flashed '<span>Login failed.</span>'"
  65
+      end
62 66
     end
63 67
 
64 68
     it "should format embedded groups" do
14  spec/spec_helper.rb
@@ -20,3 +20,17 @@
20 20
     ::Cucumber::Term::ANSIColor.coloring = true
21 21
   end
22 22
 end
  23
+
  24
+module RSpec
  25
+  module WorkInProgress
  26
+    def pending_under platforms, reason, &block
  27
+      if [platforms].flatten.map(&:to_s).include? RUBY_PLATFORM
  28
+        pending "pending under #{platforms.inspect} because: #{reason}", &block 
  29
+      else
  30
+        yield
  31
+      end
  32
+    end
  33
+  end
  34
+end
  35
+
  36
+
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.