Sha256: 038156fc0aad9b4f63229af37086bea8225f7cb46734d2e145bd0c7496f4ce22

Contents?: true

Size: 722 Bytes

Versions: 1

Compression:

Stored size: 722 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_path) }

  describe "#files" do
    it "finds the right amount of haml-files" do
      expect(files.length).to eq 36
    end

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

    it "finds js-files" do
      expect(file_paths).to include "app/assets/javascripts/translations.js"
    end

    it "finds 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.62 spec/lib/erb_inspector_spec.rb