Sha256: cb74443e8d4bbf90be2ceaa03be2a608eae4e80e7fd7872218a299b03e1e7ed9
Contents?: true
Size: 927 Bytes
Versions: 15
Compression:
Stored size: 927 Bytes
Contents
require 'spec_helper' require 'nokogiri' require 'ostruct' describe Jasmine::Page do describe "#render" do subject { Nokogiri::HTML(page.render) } let(:fake_config) do OpenStruct.new(:js_files => ["file1.js", "file2.js"], :css_files => ["file1.css", "file2.css"], :jasmine_files => ["jasmine_file1.js", "jasmine_file2.js"]) end let(:context) { fake_config } let(:page) { Jasmine::Page.new(context) } it "should render javascript files in the correct order" do js_files = subject.css("script") js_files.map { |file| file["src"] }.compact.should == ["jasmine_file1.js", "jasmine_file2.js", "file1.js", "file2.js"] end it "should render css files in the correct order" do css_files = subject.css("link[type='text/css']") css_files.map { |file| file["href"] }.compact.should == ["file1.css", "file2.css"] end end end
Version data entries
15 entries across 15 versions & 2 rubygems