Sha256: f59c4104d9569cf9c8c611c70cb92433382645d0769d09aab507012f51c60c6c

Contents?: true

Size: 882 Bytes

Versions: 20

Compression:

Stored size: 882 Bytes

Contents

require 'spec_helper'

module Roadie
  describe CSSFileNotFound do
    it "is initialized with a filename" do
      CSSFileNotFound.new('file.css').filename.should == 'file.css'
    end

    it "can be initialized with the guess the filename was based on" do
      CSSFileNotFound.new('file.css', :file).guess.should == :file
    end

    it "has a nil guess when no guess was specified" do
      CSSFileNotFound.new('').guess.should be_nil
    end

    context "without a guess" do
      it "has a message with the wanted filename" do
        CSSFileNotFound.new('style.css').message.should == 'Could not find style.css'
      end
    end

    context "with a guess" do
      it "has a message with the wanted filename and the guess" do
        CSSFileNotFound.new('style.css', :style).message.should == 'Could not find style.css (guessed from :style)'
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
roadie-2.4.3 spec/lib/roadie/css_file_not_found_spec.rb
md-roadie-2.4.2.md.1 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.4.2 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.4.1 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.4.0 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.3.4 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.3.3 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.3.2 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.3.1 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.3.0 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.3.0.pre1 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.2.0 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.1.0 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.1.0.pre2 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.1.0.pre1 spec/lib/roadie/css_file_not_found_spec.rb
roadie-2.0.0 spec/lib/roadie/css_file_not_found_spec.rb
roadie-1.1.3 spec/lib/roadie/css_file_not_found_spec.rb
roadie-1.1.1 spec/lib/roadie/css_file_not_found_spec.rb
roadie-1.1.2 spec/lib/roadie/css_file_not_found_spec.rb
roadie-1.1.0 spec/lib/roadie/css_file_not_found_spec.rb