spec/capistrano/notifier/base_spec.rb in capistrano-notifier-0.1.1 vs spec/capistrano/notifier/base_spec.rb in capistrano-notifier-0.1.2
- old
+ new
@@ -4,14 +4,21 @@
describe Capistrano::Notifier::Base do
let(:configuration) { Capistrano::Configuration.new }
subject { described_class.new configuration }
- it 'uses configured branch if not specified in configuration' do
- configuration.load { set :branch, 'foo' }
- subject.send(:branch).should == 'foo'
- end
+ describe "#branch" do
+ it "defaults to master" do
+ subject.send(:branch).should == 'master'
+ end
- it 'uses master branch if not specified in configuration' do
- subject.send(:branch).should == 'master'
+ context "when a branch is specified" do
+ before :each do
+ configuration.load { set :branch, 'foo' }
+ end
+
+ it "uses the specified branch" do
+ subject.send(:branch).should == 'foo'
+ end
+ end
end
end