Sha256: dc48093c97f747b41d9eb5175470ed27bae1ce06999e3c19eebe709f593456c7
Contents?: true
Size: 1.06 KB
Versions: 7
Compression:
Stored size: 1.06 KB
Contents
require 'spec_helper' require 'assets_booster/package/base' module AssetsBooster module Package shared_examples_for "a package" do subject{ described_class.new("test", []) } before do Rails.stub(:root){ "/rails" } end describe "name" do it "should return a string" do subject.name.should_not be_empty end end describe "view_helper_sources" do before do AssetsBooster::Railtie.packager = double("Packager") end it "should return a the package if running in a boosted environment" do AssetsBooster::Railtie.packager.should_receive(:boosted_environment?).and_return(true) subject.view_helper_sources.should == [subject.name] end it "should return the package's sources if running in a non-boosted environment" do AssetsBooster::Railtie.packager.should_receive(:boosted_environment?).and_return(false) subject.view_helper_sources.should == subject.assets end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems