Sha256: fb1d7d0dfe6faf86e7e415a51372fa2f417608be03c5778eb6840795ce472cc0

Contents?: true

Size: 1009 Bytes

Versions: 5

Compression:

Stored size: 1009 Bytes

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 "application/)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foundation-rails-6.2.0.0 spec/features/generator_spec.rb
foundation-rails-6.1.2.0 spec/features/generator_spec.rb
foundation-rails-6.1.1.3 spec/features/generator_spec.rb
foundation-rails-6.1.1.2 spec/features/generator_spec.rb
foundation-rails-6.1.1.1 spec/features/generator_spec.rb