Sha256: 893209f7ba86654d0b79ac162c3f86179dbe766c3198d632e79b08e288dc8ec5

Contents?: true

Size: 620 Bytes

Versions: 1

Compression:

Stored size: 620 Bytes

Contents

require "spec_helper"

describe AwesomeTranslations::ErbInspector do
  let(:erb_inspector) do
    AwesomeTranslations::ErbInspector.new(
      dirs: [Rails.root.to_s]
    )
  end

  let(:files) { erb_inspector.files.to_a }
  let(:file_paths) { files.map { |file| file.file_path } }

  describe "#files" do
    it "should find haml-files" do
      expect(files.length).to eq 29
    end

    it "should find haml-files" do
      expect(file_paths).to include "app/views/users/index.html.haml"
    end

    it "should find erb-files" do
      expect(file_paths).to include "app/views/users/show.html.erb"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
awesome_translations-0.0.25 spec/lib/erb_inspector_spec.rb