Sha256: b1cafa3340b10599073236bf3c4fabca37c14a832f6ce16ecafd423e0819c0ae

Contents?: true

Size: 1.24 KB

Versions: 4

Compression:

Stored size: 1.24 KB

Contents

# encoding: utf-8
require 'spec_helper'

describe Quandl::Operation::Collapse do
  
  subject { Quandl::Operation::Collapse }
  
  it { should respond_to :perform }
  
  its(:valid_collapses){ should include :daily }
  its(:valid_collapses){ should include :weekly }
  its(:valid_collapses){ should include :monthly }

  it "should return collapses_greater_than :weekly" do
    subject.collapses_greater_than(:weekly).should eq [:monthly, :quarterly, :annual]
  end
  
  it "should return collapses_greater_than_or_equal_to :weekly" do
    subject.collapses_greater_than_or_equal_to(:weekly).should eq [:weekly, :monthly, :quarterly, :annual]
  end

  it "should return collapses_greater_than :daily" do
    subject.collapses_greater_than(:daily).should eq [:weekly, :monthly, :quarterly, :annual]
  end
  
  it "should return collapses_greater_than_or_equal_to :daily" do
    subject.collapses_greater_than_or_equal_to(:daily).should eq [:daily, :weekly, :monthly, :quarterly, :annual]
  end

  it "should return collapses_greater_than :annual" do
    subject.collapses_greater_than(:annual).should eq []
  end
  
  it "should return collapses_greater_than_or_equal_to :annual" do
    subject.collapses_greater_than_or_equal_to(:annual).should eq [:annual]
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
quandl_operation-0.1.11 spec/lib/quandl/operation/collapse_spec.rb
quandl_operation-0.1.10 spec/lib/quandl/operation/collapse_spec.rb
quandl_operation-0.1.9 spec/lib/quandl/operation/collapse_spec.rb
quandl_operation-0.1.8 spec/lib/quandl/operation/collapse_spec.rb