Sha256: 3a011ee84c8811c10ef4ae1c2dfd608cd45fbb4fea96bbc969314c0a4c92e346

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 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/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 "vendor\/modernizr"/)
    expect(layout_file).to match(/javascript_include_tag "application/)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foundation-rails-6.1.1.0 spec/features/generator_spec.rb
foundation-rails-5.5.3.2 spec/features/generator_spec.rb
foundation-rails-5.5.3.1 spec/features/generator_spec.rb
foundation-rails-5.5.2.1 spec/features/generator_spec.rb