Sha256: b0f6a3ddcdda004d5409091ad59ca0a96f7b9dcd974ad181a06eeb4f762d609e

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

describe Orange do
  it "should allow core mixin via mixin method" do
    c= Orange::Core.new
    c.should_not respond_to(:mixin_orange_one)
    Orange.mixin MockMixinOrange1
    c2= Orange::Core.new
    c.should respond_to(:mixin_orange_one)
    c2.should respond_to(:mixin_orange_one)
  end
  it "should allow pulp mixin via pulp method" do
    c= Orange::Core.new
    p= Orange::Packet.new(c, {})
    p.should_not respond_to(:pulp_orange_one)
    Orange.add_pulp MockPulpOrange1
    p2= Orange::Packet.new(c, {})
    p.should respond_to(:pulp_orange_one)
    p2.should respond_to(:pulp_orange_one)
  end
  it "should allow plugins" do
    Orange.plugins.should have(0).items
    Orange.plugin(MockPlugin.new)
    Orange.plugins.should have(1).items
    Orange.plugins([:foo, :bar]).should have(0).items
    Orange.plugins([:mock_plugin]).should have(1).items
    c= Orange::Core.new(:plugins => [:foo, :bar])
    c.plugins.should have(0).items
    c2= Orange::Core.new(:plugins => [:mock_plugin])
    c2.plugins.should have(1).items
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
orange-core-0.7.1 spec/orange-core/orange_spec.rb
orange-core-0.7.0 spec/orange-core/orange_spec.rb