Sha256: 6e762646b2e6f258aaaf7b15f459df8d75ec8afe2820071d2da4e2690d5b81c4

Contents?: true

Size: 842 Bytes

Versions: 16

Compression:

Stored size: 842 Bytes

Contents

require "spec_helper"
require "generators/clearance/views/views_generator"

describe Clearance::Generators::ViewsGenerator, :generator do
  it "copies clearance views to the host application" do
    run_generator

    views = %w(
      clearance_mailer/change_password.html.erb
      clearance_mailer/change_password.text.erb
      passwords/create.html.erb
      passwords/edit.html.erb
      passwords/new.html.erb
      sessions/_form.html.erb
      sessions/new.html.erb
      users/_form.html.erb
      users/new.html.erb
    )

    view_files = views.map { |view| file("app/views/#{view}") }

    view_files.each do |each|
      expect(each).to exist
    end
  end

  it "copies clearance locales to the host application" do
    run_generator

    locale = file("config/locales/clearance.en.yml")

    expect(locale).to exist
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
clearance-2.9.2 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.9.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.9.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.8.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.7.2 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.7.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.6.2 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.6.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.6.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.5.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.4.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.3.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.3.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.2.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.2.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-2.1.0 spec/generators/clearance/views/views_generator_spec.rb