Sha256: ee8bc42e55831de03374ef1b889800c2847eafdbffb5a68c33abe3be9ed6aca4

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

shared_examples_for 'the bootstrap_css helper' do
  it { expect(:bootstrap_css).to link_to_existing_file }
end

shared_examples_for 'the bootstrap_theme_css helper' do
  it { expect(:bootstrap_theme_css).to link_to_existing_file }
end

shared_examples_for 'the bootstrap_js helper' do
  it { expect(:bootstrap_js).to link_to_existing_file }
end

shared_examples_for 'the font_awesome_css helper' do
  it { expect(:font_awesome_css).to link_to_existing_file }
end

shared_examples_for 'the font_awesome_js helper' do
  it { expect(:font_awesome_js).to link_to_existing_file }
end

#--

RSpec::Matchers.define :link_to_existing_file do
  match do |helper|
    require 'open-uri'
    open_uri_options = {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}
    # via HTTP
    open railsstrap.send(helper, scheme: :http), open_uri_options

    # via HTTPS
    open railsstrap.send(helper, scheme: :https), open_uri_options

    # non-minified
    open railsstrap.send(helper, scheme: :http, minified: false), open_uri_options

    # legacy version
    open railsstrap.send(helper, scheme: :http, version: '3.1.0'), open_uri_options
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
railsstrap-4.0.0.beta3 spec/shared/cdn_helper.rb
railsstrap-4.0.0.beta2 spec/shared/cdn_helper.rb