Sha256: 2b31f0dc04b0e3cfc452edceea17b524f9664fc397044f41aae776a77df83361

Contents?: true

Size: 919 Bytes

Versions: 16

Compression:

Stored size: 919 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
      layouts/application.html.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
      expect(each).to have_correct_syntax
    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.0.0.beta1 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.17.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.16.2 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.16.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.16.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.15.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.15.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.14.2 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.14.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.14.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.13.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.12.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.12.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.11.0 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.10.1 spec/generators/clearance/views/views_generator_spec.rb
clearance-1.9.0 spec/generators/clearance/views/views_generator_spec.rb