Sha256: 11c339d325de9ee22d03b286cab78aa0d3b564de7d1a7b4fac952b6c3432f987

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

require 'spec_helper'

describe Monsoon do
  before(:each) do
    Monsoon.bucket = nil
    Monsoon.key = nil
    Monsoon.secret = nil
    Monsoon.mongo_uri = nil
  end

  it "should be able to set AWS properties" do
    Monsoon.bucket = "backups"
    Monsoon.key = "key"
    Monsoon.secret = "secret"

    Monsoon.bucket.should == "backups"
    Monsoon.key.should == "key"
    Monsoon.secret.should == "secret"
  end

  it "should be able to set options through configure block" do
    Monsoon.configure do |config|
      config.bucket             = "backups"
      config.key                = "key"
      config.secret             = "secret"
      config.mongo_uri          = "mongodb://testuser:pass1@test.mongohq.com:10036/app_development"
    end

    Monsoon.bucket.should == "backups"
    Monsoon.key.should == "key"
    Monsoon.secret.should == "secret"
    Monsoon.mongo_uri.should == "mongodb://testuser:pass1@test.mongohq.com:10036/app_development"
  end

  describe ".perform" do
    before(:each) do
      Monsoon::Client.any_instance.stub(:run).and_return(true)
    end

    it "should excute the run method on a client instance" do
      Monsoon::Client.any_instance.should_receive(:run)
      Monsoon.perform
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
monsoon-0.6.1 spec/monsoon_spec.rb
monsoon-0.6 spec/monsoon_spec.rb
monsoon-0.5 spec/monsoon_spec.rb
monsoon-0.4 spec/monsoon_spec.rb
monsoon-0.3 spec/monsoon_spec.rb
monsoon-0.2 spec/monsoon_spec.rb