Sha256: 2a6f5b79748ef12057e047f29a7e6aab6c0b4171a6867af65d5a7ac15b337de6
Contents?: true
Size: 1.76 KB
Versions: 9
Compression:
Stored size: 1.76 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Tekeya" do describe "loading" do !(defined?(Rails).nil?).should == true !(defined?(ActiveRecord).nil?).should == true !(defined?(Mongoid).nil?).should == true !(defined?(Configuration).nil?).should == true !(defined?(Entity).nil?).should == true !(defined?(Entity::Group).nil?).should == true end describe "configuration" do it "should hold the correct data" do Tekeya::Configuration.instance.redis_host.should == "localhost" Tekeya::Configuration.instance.redis_port.should == "9736" Tekeya::Configuration.instance.rebatdb_host.should == "localhost" Tekeya::Configuration.instance.rebatdb_port.should == "2011" Tekeya::Configuration.instance.feed_storage_orm.should == TEKEYA_ORM end describe "YML configuration" do before :all do conf_file = "#{File.dirname(__FILE__)}/../tmp/tekeya_config.yml" f = File.new(conf_file, 'w') doc = %Q{ test: redis_host: 'localhost' redis_port: '9736' rebatdb_host: 'localhost' rebatdb_port: '2011' feed_storage_orm: #{TEKEYA_ORM} } f.puts(doc) f.close Tekeya::Configuration.instance.parse_config_file(conf_file) end it "should hold the correct data loaded from the yml" do Tekeya::Configuration.instance.redis_host.should == "localhost" Tekeya::Configuration.instance.redis_port.should == "9736" Tekeya::Configuration.instance.rebatdb_host.should == "localhost" Tekeya::Configuration.instance.rebatdb_port.should == "2011" Tekeya::Configuration.instance.feed_storage_orm.should == TEKEYA_ORM.to_s end end end end
Version data entries
9 entries across 9 versions & 1 rubygems