Sha256: 0b9495a1f4a116b4e16c45d609a0e5a1e51453e7999d77e72168db8eff3fe5c5

Contents?: true

Size: 709 Bytes

Versions: 8

Compression:

Stored size: 709 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))

describe Pickle::Injector do
  describe ".inject Pickle::Session, :into => <a class>" do
    before do
      klass = Class.new
      Pickle::Injector.inject Pickle::Session, :into => klass
      @object = klass.new
    end
    
    it "object should respond_to Pickle:Session methods" do
      @object.should respond_to(:model)
      @object.should respond_to(:create_model)
      @object.should respond_to(:find_model)
    end
    
    it "object.model (a pickle method) should call object.pickle_session.model" do
      @object.pickle_session.should_receive(:model).with('a user')
      @object.model('a user')
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
ianwhite-pickle-0.1.2 spec/lib/pickle_injector_spec.rb
ianwhite-pickle-0.1.3 spec/lib/pickle_injector_spec.rb
ianwhite-pickle-0.1.4 spec/lib/pickle_injector_spec.rb
ianwhite-pickle-0.1.5 spec/lib/pickle_injector_spec.rb
schlick-pickle-0.1.5.1 spec/lib/pickle_injector_spec.rb
schlick-pickle-0.1.5.2 spec/lib/pickle_injector_spec.rb
schlick-pickle-0.1.5.3 spec/lib/pickle_injector_spec.rb
schlick-schlick-pickle-0.1.5.1 spec/lib/pickle_injector_spec.rb