Sha256: b00405145926081d9be7fcf27064d9a62692edb4bb1a156e9747949525cf11b4
Contents?: true
Size: 1.52 KB
Versions: 3
Compression:
Stored size: 1.52 KB
Contents
require_relative '../../../lib/snapdragon/suite' describe Snapdragon::Suite do describe "#initialize" do it "constucts an instance of a Suite given an array of paths" do paths = [stub, stub, stub] Snapdragon::Suite.new(paths) end it "stores the paths in an instance variable" do paths = [stub, stub, stub] suite = Snapdragon::Suite.new(paths) suite.instance_variable_get(:@paths).should eq(paths) end end describe "#spec_files" do it "creates a path object to represent the path" do paths = ['path_a_str', 'path_b_str'] suite = Snapdragon::Suite.new(paths) Snapdragon::Path.should_receive(:new).with('path_a_str').and_return(stub(spec_files: [])) Snapdragon::Path.should_receive(:new).with('path_b_str').and_return(stub(spec_files: [])) suite.spec_files end it "returns the collection of the spec files of all of the paths" do paths = ['path_a_str', 'path_b_str'] suite = Snapdragon::Suite.new(paths) spec_file_a = stub('spec_file_a'), spec_file_b = stub('spec_file_b') Snapdragon::Path.stub(:new).with('path_a_str').and_return(stub(spec_files: [spec_file_a])) Snapdragon::Path.stub(:new).with('path_b_str').and_return(stub(spec_files: [spec_file_b])) suite.spec_files.should eq([spec_file_a, spec_file_b]) end end describe "#require_paths" do it "returns the merged set of the require paths of each spec file" do pending end end describe "#require_files" do it "needs to be tested" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
snapdragon-0.1.9 | spec/lib/snapdragon/suite_spec.rb |
snapdragon-0.1.8 | spec/lib/snapdragon/suite_spec.rb |
snapdragon-0.1.7 | spec/lib/snapdragon/suite_spec.rb |