Sha256: c35677e6e25852286b3070d4810d6cc68750e837c98b8c6eb1def42d747b3569

Contents?: true

Size: 932 Bytes

Versions: 24

Compression:

Stored size: 932 Bytes

Contents

require 'spec_helper'

describe Picky::Generators::PartialGenerator do

  context 'integration' do
    it 'should generate the correct values with a given strategy' do
      generator = described_class.new :meier => [1], :maier => [2]
      
      generator.generate(Picky::Generators::Partial::Substring.new).should == {
        :meier => [1],
        :meie => [1],
        :mei => [1],
        :me => [1],
        :m => [1, 2],
        :maier => [2],
        :maie => [2],
        :mai => [2],
        :ma => [2]
      }
    end
    it 'should generate the correct values with a given specific strategy' do
      generator = described_class.new :meier => [1], :maier => [2]
      
      generator.generate(Picky::Generators::Partial::Substring.new(:from => 3)).should == {
        :meier => [1],
        :meie => [1],
        :mei => [1],
        :maier => [2],
        :maie => [2],
        :mai => [2]
      }
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
picky-3.3.1 spec/lib/generators/partial_generator_spec.rb
picky-3.3.0 spec/lib/generators/partial_generator_spec.rb
picky-3.2.0 spec/lib/generators/partial_generator_spec.rb
picky-3.1.13 spec/lib/generators/partial_generator_spec.rb
picky-3.1.12 spec/lib/generators/partial_generator_spec.rb
picky-3.1.11 spec/lib/generators/partial_generator_spec.rb
picky-3.1.10 spec/lib/generators/partial_generator_spec.rb
picky-3.1.9 spec/lib/generators/partial_generator_spec.rb
picky-3.1.8 spec/lib/generators/partial_generator_spec.rb
picky-3.1.7 spec/lib/generators/partial_generator_spec.rb
picky-3.1.6 spec/lib/generators/partial_generator_spec.rb
picky-3.1.5 spec/lib/generators/partial_generator_spec.rb
picky-3.1.4 spec/lib/generators/partial_generator_spec.rb
picky-3.1.3 spec/lib/generators/partial_generator_spec.rb
picky-3.1.2 spec/lib/generators/partial_generator_spec.rb
picky-3.1.1 spec/lib/generators/partial_generator_spec.rb
picky-3.1.0 spec/lib/generators/partial_generator_spec.rb
picky-3.0.1 spec/lib/generators/partial_generator_spec.rb
picky-3.0.0 spec/lib/generators/partial_generator_spec.rb
picky-3.0.0.pre5 spec/lib/generators/partial_generator_spec.rb