Sha256: 191e34731d8151ad273b499410610e910c7b34198135908c5e1269c75710616a
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' describe Roadie do describe ".inline_css" do it "creates an instance of Roadie::Inliner and execute it" do Roadie::Inliner.should_receive(:new).with('attri', 'butes').and_return(double('inliner', :execute => 'html')) Roadie.inline_css('attri', 'butes').should == 'html' end end describe ".load_css(root, targets)" do let(:fixtures_root) { Pathname.new(__FILE__).dirname.join('..', 'fixtures', 'public', 'stylesheets') } it "loads files matching the target names under root/public/stylesheets" do Roadie.load_css(fixtures_root, ['foo']).should == 'contents of foo' Roadie.load_css(fixtures_root, ['foo.css']).should == 'contents of foo' end it "loads files in order and join them with a newline" do Roadie.load_css(fixtures_root, %w[foo bar]).should == "contents of foo\ncontents of bar" Roadie.load_css(fixtures_root, %w[bar foo]).should == "contents of bar\ncontents of foo" end it "raises a Roadie::CSSFileNotFound error when a css file could not be found" do expect { Roadie.load_css(fixtures_root, ['not_here']) }.to raise_error(Roadie::CSSFileNotFound, /not_here/) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roadie-1.1.3 | spec/lib/roadie_spec.rb |