Sha256: 4d14a817591fd05cd7f1db3cf00025f5e9207f62e3b89c3648061435c4768a5d

Contents?: true

Size: 919 Bytes

Versions: 23

Compression:

Stored size: 919 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Quandl::Format::Dataset::Client do
  
  context "without attributes" do
    subject{ Quandl::Format::Dataset.new }
    its(:valid?){ should be_false }
    its(:upload){ should be_false }
  end
  
  let(:attributes) { qdf_attributes }
  let(:dataset){ Quandl::Format::Dataset.new( attributes ) }
  subject{ dataset }
  
  it{ should respond_to :valid? }
  it{ should respond_to :upload }

  its(:valid?){ should be_true }
  its(:client){ should be_a Quandl::Client::Dataset }
  
  ["string", 10, Date.today, [1,2,3], {hash: 'test'} ].each do |value|
    it "#client= #{value.class} should raise_error ArgumentError" do
      expect{ subject.client = value }.to raise_error ArgumentError
    end
  end
  
  it "#client= Quandl::Client::Dataset should return client" do
    d = Quandl::Client::Dataset.new
    subject.client = d
    subject.client.should eq d
  end
  
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
quandl_format-0.4.3 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.4.2 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.4.1 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.4.0 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.3.0 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.8 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.7 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.6 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.5 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.4 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.3 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.2 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.1 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.2.0 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.1.8 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.1.7 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.1.6 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.1.5 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.1.4 spec/lib/quandl/format/dataset/client_spec.rb
quandl_format-0.1.3 spec/lib/quandl/format/dataset/client_spec.rb