Sha256: fbbe63fc13eb552dcf6ec894b56074ecd4ad9f08fb06dac4a97ab303de9be5c0
Contents?: true
Size: 1.1 KB
Versions: 28
Compression:
Stored size: 1.1 KB
Contents
require 'simple_spec_helper' class WithLolitaExtensions include Lolita::Extensions end module Lolita::Extensions::Test class Proxy def initialize *args end end end describe Lolita::Extensions do let(:test_class){ WithLolitaExtensions.new } let(:object){ klass = Object.new klass.class_eval{include Lolita::Extensions} klass } it "should load all extensions proxies" do Lolita::Extensions.add(:test) test_class.load_extensions_proxies(object) test_class.test_proxy.should be_a(Lolita::Extensions::Test::Proxy) end context "default extensions" do it "should have default extensions proxies" do test_class.load_extensions_proxies(object) Lolita::Extensions::EXTENSIONS.each do |name| test_class.send(:"#{name}_proxy").should be_a("Lolita::Extensions::#{name.to_s.camelize}::Proxy".constantize) end end end context "default configuration" do it "should have authentication adapter" do test_class.load_extensions_proxies(object) test_class.authentication_proxy.respond_to?(:adapter).should be_true end end end
Version data entries
28 entries across 28 versions & 1 rubygems