Sha256: 927bef555f4f8540ccf8e7085f2f5c02c07db498544e86cff6cdeaf68d02284f

Contents?: true

Size: 846 Bytes

Versions: 3

Compression:

Stored size: 846 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Sheet do

  before(:all){ Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN'] }
  
  let(:sheet){ build(:sheet) }
  
  subject{ sheet }
  
  its(:valid?){ should be_true }
  
  context "when saved" do
    
    before(:each){ subject.save }
    
    its(:saved?){ should be_true }
    
    describe "#description" do
      
      its(:description){ should eq "Test sheet description." }
      
      it "should find the description" do
        Sheet.find( subject.id ).description.should eq "Test sheet description."
      end
      
      it "should update the description" do
        subject.description = "New description."
        subject.save
        Sheet.find( subject.id ).description.should eq "New description."
      end
      
    end
    
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
quandl_client-2.7.11 spec/lib/quandl/client/sheet_spec.rb
quandl_client-2.7.5 spec/lib/quandl/client/sheet_spec.rb
quandl_client-2.7.4 spec/lib/quandl/client/sheet_spec.rb