Sha256: a825651f0626fcb8526aa59a3fe6406ed68becef4251f48465777f58a7729ec2
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 KB
Contents
require "spec_helper" describe StyleGuide::Section do let(:path) { "/magnetic/sputum" } let(:section) { StyleGuide::Section.new(path) } describe "#title" do subject { section.title } context "with a simple path" do it { should == "Sputum" } end context "with a path activerecord would be good at" do let(:path) { "/tasty/bicycle_tires" } it { should == "Bicycle Tires" } end context "with a path containing extra stuff" do let(:path) { "/help/kocher%has-m1y=keyb^oaard" } it { should == "Kocher%Has M1y=Keyb^Oaard" } end end describe "#id" do subject { section.id } context "with a simple path" do it { should == "sputum" } end context "with a good activerecord path" do let(:path) { "/tasty/bicycle_tires" } it { should == "bicycle_tires" } end context "with a path containing extra stuff" do let(:path) { "/help/kocher%has-m1y=keyb^oaard" } it { should == "kocher_has_m1y_keyb_oaard" } end end describe "#partials" do let(:partial_paths) { ["/corrosive/chapstick", "/rusty/derringer"] } subject { section.partials } before { Dir.stub(:glob => partial_paths) } it { should have(2).partials } its(:first) { should be_a StyleGuide::Partial } end end
Version data entries
6 entries across 6 versions & 1 rubygems