Sha256: e326e67916ef356e061bfae8f7c18073f47ffad5a70acaf524643e50310255da

Contents?: true

Size: 843 Bytes

Versions: 36

Compression:

Stored size: 843 Bytes

Contents

require 'spec_helper'
require_relative '../../app/helpers/javascript_helper'

describe JavascriptHelper, type: :helper do
  describe "#application_javascript" do
    describe "when a layout_javascript is specified" do
      it "returns a javascript_include_tag based on the configured layout_javascript" do
        WoopleTheme.configure do |config|
          config.layout_javascript = 'javascript'
        end

        html = helper.application_javascript
        html.should match /javascript/
        html.should match /script/
      end
    end

    describe "when no layout_javascript is specified" do
      it "does not return anything" do
        WoopleTheme.configure do |config|
          config.layout_javascript = nil
        end

        html = helper.application_javascript
        html.should be_nil
      end
    end

  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
woople-theme-0.8.1 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.0 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.27 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.26 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.25 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.24 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.23 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.22 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.21 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.20 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.19 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.18 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.17 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.14 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.13 spec/helpers/javascript_helper_spec.rb
woople-theme-0.6.12 spec/helpers/javascript_helper_spec.rb