Sha256: 79e8a082bb99c7db6508c7e030b91f70a1b9e44b59b7b82296873d642c788364
Contents?: true
Size: 1.21 KB
Versions: 5
Compression:
Stored size: 1.21 KB
Contents
require 'helper' class TestRepo < Test::Unit::TestCase context "when passed a string containg a forward slash" do setup do @repo = Octopussy::Repo.new("pengwynn/linkedin") end should "set the username and repo name" do @repo.name.should == "linkedin" @repo.username.should == "pengwynn" end should "repond to user and repo" do @repo.repo.should == "linkedin" @repo.user.should == "pengwynn" end should "render slug as string" do @repo.slug.should == "pengwynn/linkedin" @repo.to_s.should == @repo.slug end should "render url as string" do @repo.url.should == 'http://github.com/pengwynn/linkedin' end end context "when passed a hash" do should "should set username and repo" do repo = Octopussy::Repo.new({:username => 'pengwynn', :name => 'linkedin'}) repo.name.should == "linkedin" repo.username.should == "pengwynn" end end context "when passed a Repo" do should "set username and repo" do repo = Octopussy::Repo.new( Octopussy::Repo.new('pengwynn/linkedin')) repo.name.should == "linkedin" repo.username.should == "pengwynn" end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
octopussy-0.1.4 | test/test_repo.rb |
octopussy-0.1.3 | test/test_repo.rb |
octopussy-0.1.2 | test/test_repo.rb |
octopussy-0.1.1 | test/test_repo.rb |
octopussy-0.1.0 | test/test_repo.rb |