Sha256: 39cc6390f8237b0618fbce32ef6a5370b5dadd01fa37968d8904a0f5d4893f0e

Contents?: true

Size: 781 Bytes

Versions: 15

Compression:

Stored size: 781 Bytes

Contents

require 'spec_helper'

module Roadie
  describe CssNotFound do
    it "is initialized with a name" do
      error = CssNotFound.new('style.css')
      expect(error.css_name).to eq('style.css')
      expect(error.message).to eq('Could not find stylesheet "style.css"')
    end

    it "can be initialized with an extra message" do
      expect(CssNotFound.new('file.css', "directory is missing").message).to eq(
        'Could not find stylesheet "file.css": directory is missing'
      )
    end

    it "shows information about used provider when given" do
      provider = double("Some cool provider")
      expect(CssNotFound.new('style.css', nil, provider).message).to eq(
        %(Could not find stylesheet "style.css"\nUsed provider:\n#{provider})
      )
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
roadie-3.5.1 spec/lib/roadie/css_not_found_spec.rb
roadie-3.5.0 spec/lib/roadie/css_not_found_spec.rb
roadie-3.4.0 spec/lib/roadie/css_not_found_spec.rb
roadie-3.3.0 spec/lib/roadie/css_not_found_spec.rb
roadie-3.2.2 spec/lib/roadie/css_not_found_spec.rb
roadie-3.2.1 spec/lib/roadie/css_not_found_spec.rb
roadie-3.2.0 spec/lib/roadie/css_not_found_spec.rb
roadie-3.1.1 spec/lib/roadie/css_not_found_spec.rb
roadie-3.1.0 spec/lib/roadie/css_not_found_spec.rb
roadie-3.1.0.rc1 spec/lib/roadie/css_not_found_spec.rb
roadie-3.0.5 spec/lib/roadie/css_not_found_spec.rb
roadie-3.0.4 spec/lib/roadie/css_not_found_spec.rb
roadie-3.0.3 spec/lib/roadie/css_not_found_spec.rb
roadie-3.0.2 spec/lib/roadie/css_not_found_spec.rb
roadie-3.0.1 spec/lib/roadie/css_not_found_spec.rb