Sha256: 4344295c7dbd1bba41872aaf5186e367c5403a7f70f515047de5c9b0db40d460

Contents?: true

Size: 883 Bytes

Versions: 4

Compression:

Stored size: 883 Bytes

Contents

require 'spec_helper'

class AssetClass
  include Rack::Webconsole::AssetHelpers
end

module Rack
  describe Webconsole::AssetHelpers do

    describe '#html_code' do
      it 'loads the html code' do
        asset_class = AssetClass.new
        html = asset_class.html_code

        html.must_match /console/
        html.must_match /results/
        html.must_match /form/
      end
    end

    describe '#css_code' do
      it 'loads the css code' do
        asset_class = AssetClass.new
        css = asset_class.css_code

        css.must_match /<style/
        css.must_match /text\/css/
        css.must_match /#console/
      end
    end

    describe '#js_code' do
      it 'loads the js code' do
        asset_class = AssetClass.new
        js = asset_class.js_code

        js.must_match /\$\("#console"\)/
        js.must_match /escapeHTML/
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rack-webconsole-0.0.5 spec/rack/webconsole/asset_helpers_spec.rb
rack-webconsole-0.0.4 spec/rack/webconsole/asset_helpers_spec.rb
rack-webconsole-0.0.3 spec/rack/webconsole/asset_helpers_spec.rb
rack-webconsole-0.0.1 spec/rack/webconsole/asset_helpers_spec.rb