Sha256: e2593faf85ab9ae34b3550ad5f3061fd0923b96b676c4732f99db5f40e8a9559
Contents?: true
Size: 1.95 KB
Versions: 4
Compression:
Stored size: 1.95 KB
Contents
require 'spec_helper' describe Love do describe '#config' do it 'should set property by_gemname to true if there arg by_gem' do Love.config ['by_gem'] Love.by_gemname.should be_true end it 'should set property by_gemname to false if there no arg by_gem' do Love.config Love.by_gemname.should be_false end it 'should set property for_site to true if there arg site' do Love.config ['site'] Love.for_site.should be_true end it 'should set property for_site to false if there no arg site' do Love.config Love.for_site.should be_false end it 'should set property check_author to true if there arg -v' do Love.config ['-v'] Love.check_author.should be_true end it 'should set property check_author to false if there no arg -v' do Love.config Love.check_author.should be_false end it 'should set property root to lib folder' do Love.config Love.root.should == Pathname(__FILE__).parent.parent.parent.join('lib') end it 'should set property lang to en' do Love.config Love.lang.should == 'en' end end describe '#login_user' do it 'should ask user to login and create octokit client' do STDIN.should_receive(:gets).twice.and_return 'dummy' STDOUT.should_receive(:puts).exactly(3).times Love.login_user Love.octokit.class.should == Octokit::Client end end describe '#parse_gemfile' do it 'should run bundler to check current runtime and add gems from there' do pending Bundler.should_receive(:load) Love.parse_gemfile end end describe '#share_love' do it 'should trigger html generation if for site' do Love.config ['site'] Love::Share.should_receive(:html) Love.share_love end it 'should trigger html generation if for gem' do Love.config Love::Share.should_receive(:md) Love.share_love end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
share_some_love-0.1.4 | spec/love/basic_spec.rb |
share_some_love-0.1.3 | spec/love/basic_spec.rb |
share_some_love-0.1.2 | spec/love/basic_spec.rb |
share_some_love-0.1.1 | spec/love/basic_spec.rb |