Sha256: 39fd0a5e65c936cf934fcc7a361ecc3115b3730eb2ec7d28fb04680eb992b7c8
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' describe MooMoo::Config do before :each do @config = MooMoo::Config.new end it { @config.should have_attr_accessor :host } it { @config.should have_attr_accessor :key } it { @config.should have_attr_accessor :username } it { @config.should have_attr_accessor :port } describe "default configuration" do before :each do File.should_receive(:exists?).with(".moomoo.yml").and_return(true) File.should_receive(:open).with(".moomoo.yml").and_return( " host: thehost key: thekey username: theuser port: theport " ) @config = MooMoo::Config.new end it "should set default host from default options file" do @config.host.should == "thehost" end it "should set default key from default options file" do @config.key.should == "thekey" end it "should set default user from default options file" do @config.username.should == "theuser" end it "should set default port from default options file" do @config.port.should == "theport" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
moo_moo-0.12.0 | spec/moo_moo/config_spec.rb |
moo_moo-0.11.0 | spec/moo_moo/config_spec.rb |
moo_moo-0.10.0 | spec/moo_moo/config_spec.rb |