Sha256: e17772a954dcf811fda118821b1c7a2148235b947d001af3391c9fa6f57262a3

Contents?: true

Size: 726 Bytes

Versions: 8

Compression:

Stored size: 726 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 "should find haml-files" do
      expect(files.length).to eq 32
    end

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

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awesome_translations-0.0.58 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.57 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.56 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.55 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.54 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.53 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.52 spec/lib/erb_inspector_spec.rb
awesome_translations-0.0.51 spec/lib/erb_inspector_spec.rb