Sha256: 0c33ce228022fdbbdf6ccd7547f629ddeabda702eb9c41a357c246d4f1f29fcb

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'
require 'support/nokogiri_helper'

module LiteXBRL
  describe TDnet do
    include NokogiriHelper

    let(:dir) { File.expand_path '../data/tdnet', __FILE__ }

    describe '.find_reader' do
      context 'Summary' do
        it do
          document = TDnet.send :find_reader, doc("#{dir}/summary.xbrl")
          expect(document).to eq(LiteXBRL::TDnet::Summary)
        end
      end

      context 'Summary2' do
        it do
          document = TDnet.send :find_reader, doc("#{dir}/summary2.htm")
          expect(document).to eq(LiteXBRL::TDnet::Summary2)
        end
      end

      context 'ResultsForecast' do
        it do
          document = TDnet.send :find_reader, doc("#{dir}/results_forecast.xbrl")
          expect(document).to eq(LiteXBRL::TDnet::ResultsForecast)
        end
      end

      context 'ResultsForecast2' do
        it do
          document = TDnet.send :find_reader, doc("#{dir}/results_forecast2.htm")
          expect(document).to eq(LiteXBRL::TDnet::ResultsForecast2)
        end
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
litexbrl-0.2.2 spec/tdnet_spec.rb
litexbrl-0.2.1 spec/tdnet_spec.rb
litexbrl-0.2.0 spec/tdnet_spec.rb