Sha256: 7907310f42c256069778338e9705936b7ba0d89ee160996b9c0009f630551bcb
Contents?: true
Size: 642 Bytes
Versions: 32
Compression:
Stored size: 642 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
32 entries across 30 versions & 8 rubygems