Sha256: b24abfac77f7bb01ccf27cc502d36ebc57b262386bb464cab48132180a338356

Contents?: true

Size: 786 Bytes

Versions: 1

Compression:

Stored size: 786 Bytes

Contents

require 'spec_helper'

describe MooMoo do
  describe "::Version" do
    it "has a valid version" do
      MooMoo::Version.should match /\d+\.\d+\.\d+/
    end
  end

  describe "::configure" do
    it { MooMoo.configure.should be_a MooMoo::Config }

    it "loads default settings from config if none are provided" do
      MooMoo.configure do |config|
        config.host = 'host.com'
        config.key  = 'secret'
        config.user = 'username'
        config.pass = 'secret2'
      end

      opensrs = MooMoo::Base.new

      opensrs.host.should == 'host.com'
      opensrs.key.should  == 'secret'
      opensrs.user.should == 'username'
      opensrs.pass.should == 'secret2'
    end
  end

  describe "::config" do
    it { MooMoo.should have_attr_accessor :config }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moo_moo-0.2.0 spec/moo_moo_spec.rb