Sha256: 52e70faa201637012abc6155ae3cdf38865e77be50961ca1ddf1e4378f646d5d

Contents?: true

Size: 596 Bytes

Versions: 1

Compression:

Stored size: 596 Bytes

Contents

require 'spec_helper'

describe Belajar::Loading::Units do

  let(:course_name) { course_dir_names.first }
  let(:chapter_path) { chapter_dirs(course_name).first }
  let(:chapter_name) { File.basename(chapter_path) }

  let(:subjects) { Belajar::Loading::Units.load(chapter_path) }

  it "has the prescribed number of units" do
    units_count = available_units(course_name, chapter_name).count
    expect(subjects.count).to eq units_count
  end

  it "loads the available units" do
    subjects.each_with_index do |unit, index|
      expect(unit.title).to eq unit_titles[index]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
belajar-0.1.1 spec/belajar/loading/units_spec.rb