Sha256: 1256abea81eb57f34195262a679bacd4b81c2f7fb807562b86a05521d14a6adb

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

require 'spec_helper'

describe Vkontakte do
  it "should be valid" do
    Vkontakte.should be_a(Module)
  end
  
  context "setup" do
    before(:each) do
      Vkontakte.setup do |config|
        config.app_id = 1234567
        config.app_secret = "supersecretkey"
        config.format = :xml
        config.debug = false
        config.logger = nil
      end
    end
    
    it "should set config options" do
      Vkontakte.config.app_id.should == 1234567
      Vkontakte.config.app_secret.should == 'supersecretkey'
      Vkontakte.config.format.should == :xml
    end
    
    it "should raise error on not exists option" do
      lambda {
        Vkontakte.config.some_param
      }.should raise_error(StandardError)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vkontakte-0.0.2 spec/vkontakte_spec.rb
vkontakte-0.0.1 spec/vkontakte_spec.rb