Sha256: 337c429589cc532db17531c9af1e83ccda6cd20ff6c6782226400d9b2b6d5fdc

Contents?: true

Size: 1.07 KB

Versions: 15

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

feature 'Foundation install succeeds' do
  scenario 'stylesheets assets files are added' do
    application_css_file = IO.read("#{dummy_app_path}/app/assets/stylesheets/application.css")

    expect(File).to exist("#{dummy_app_path}/app/assets/stylesheets/_settings.scss")
    expect(File).to exist("#{dummy_app_path}/app/assets/stylesheets/foundation_and_overrides.scss")
    expect(application_css_file).to match(/require foundation_and_overrides/)
  end

  scenario 'javascripts assets files are added' do
    application_js_file = IO.read("#{dummy_app_path}/app/assets/javascripts/application.js")

    expect(application_js_file).to match(/require foundation/)
    expect(application_js_file).to match(Regexp.new(Regexp.escape('$(function(){ $(document).foundation(); });')))
  end

  scenario 'layout file loads assets' do
    layout_file = IO.read("#{dummy_app_path}/app/views/layouts/application.html.erb")

    expect(layout_file).to match(/stylesheet_link_tag    "application"/)
    expect(layout_file).to match(/javascript_include_tag "application/)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
foundation-rails-6.9.0.0 spec/features/generator_spec.rb
foundation-rails-6.6.2.0 spec/features/generator_spec.rb
foundation-rails-6.6.1.0 spec/features/generator_spec.rb
foundation-rails-6.5.3.0 spec/features/generator_spec.rb
foundation-rails-6.5.1.0 spec/features/generator_spec.rb
foundation-rails-6.4.3.0 spec/features/generator_spec.rb
foundation-rails-6.4.1.3 spec/features/generator_spec.rb
foundation-rails-6.4.1.2 spec/features/generator_spec.rb
foundation-rails-6.4.1.0 spec/features/generator_spec.rb
foundation-rails-6.3.1.0 spec/features/generator_spec.rb
foundation-rails-6.3.0.0 spec/features/generator_spec.rb
foundation-rails-6.2.4.0 spec/features/generator_spec.rb
foundation-rails-6.2.3.0 spec/features/generator_spec.rb
foundation-rails-6.2.1.0 spec/features/generator_spec.rb
foundation-rails-6.2.0.1 spec/features/generator_spec.rb