Sha256: aebef6b0dc114c11753b8a585d29024342253ff6197b1ac7b43b82c379cc5264

Contents?: true

Size: 658 Bytes

Versions: 16

Compression:

Stored size: 658 Bytes

Contents

require 'spec_helper'

describe Pickle do
  it ".config should be same object on multiple calls" do
    expect(Pickle.config).to eq(Pickle.config)
  end
  
  it ".configure should configure the .config object" do
    expect(Pickle.config).to receive(:foo).with(:bar)
    Pickle.configure do |c|
      c.foo :bar
    end
  end

  it ".parser should create a parser with the default config" do
    Pickle.instance_variable_set('@parser', nil)
    expect(Pickle::Parser).to receive(:new).with(:config => Pickle.config)
    Pickle.parser
  end
  
  it ".parser should be same object on multiple calls" do
    expect(Pickle.parser).to eq(Pickle.parser)
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
pickle-0.9.0 spec/pickle_spec.rb
pickle-0.8.0 spec/pickle_spec.rb
pickle-0.7.2 spec/pickle_spec.rb
pickle-0.7.1 spec/pickle_spec.rb
pickle-0.7.0 spec/pickle_spec.rb
pickle-0.6.2 spec/pickle_spec.rb
pickle-0.6.1 spec/pickle_spec.rb
pickle-0.6.0 spec/pickle_spec.rb
pickle-0.5.5 spec/pickle_spec.rb
pickle-0.5.4 spec/pickle_spec.rb
pickle-0.5.3 spec/pickle_spec.rb
pickle-0.5.2 spec/pickle_spec.rb
spbtv_pickle-0.5.2 spec/pickle_spec.rb
spbtv_pickle-0.5.1 spec/pickle_spec.rb
pickle-0.5.1 spec/pickle_spec.rb
pickle-0.5.0 spec/pickle_spec.rb