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.10.0 spec/helpers/javascript_helper_spec.rb
woople-theme-0.9.0 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.19 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.18 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.17 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.16 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.15 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.14 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.13 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.12 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.11 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.10 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.9 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.8 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.7 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.6 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.5 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.4 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.3 spec/helpers/javascript_helper_spec.rb
woople-theme-0.8.2 spec/helpers/javascript_helper_spec.rb