Sha256: a58f8aa9dd0c9fa295e2bfe273e4fcb39da02ff6a3a1331e0f78e03590040554
Contents?: true
Size: 627 Bytes
Versions: 27
Compression:
Stored size: 627 Bytes
Contents
require 'spec_helper' require 'cucumber/rb_support/rb_transform' module Cucumber module RbSupport describe RbTransform do def transform(regexp) RbTransform.new(nil, regexp, lambda { |a| }) end describe "#to_s" do it "converts captures groups to non-capture groups" do transform(/(a|b)bc/).to_s.should == "(?:a|b)bc" end it "leaves non capture groups alone" do transform(/(?:a|b)bc/).to_s.should == "(?:a|b)bc" end it "strips away anchors" do transform(/^xyz$/).to_s.should == "xyz" end end end end end
Version data entries
27 entries across 25 versions & 2 rubygems