spec/sprinkle/installers/source_spec.rb in sprinkle-0.5.2 vs spec/sprinkle/installers/source_spec.rb in sprinkle-0.6.0
- old
+ new
@@ -74,39 +74,39 @@
end
describe 'customized configuration' do
it 'should support specification of "enable" options' do
- @installer.enable.first.should == %w( headers ssl deflate so )
+ @installer.enable.should == %w( headers ssl deflate so )
end
it 'should support specification of "disable" options' do
- @installer.disable.first.should == %w( cache proxy rewrite )
+ @installer.disable.should == %w( cache proxy rewrite )
end
it 'should support specification of "with" options' do
- @installer.with.first.should == %w( debug extras )
+ @installer.with.should == %w( debug extras )
end
it 'should support specification of "without" options' do
- @installer.without.first.should == %w( fancyisms pandas )
+ @installer.without.should == %w( fancyisms pandas )
end
it 'should support specification of "option" options' do
- @installer.option.first.should == %w( foo bar baz )
+ @installer.option.should == %w( foo bar baz )
end
it 'should support customized build area' do
- @installer.prefix.first.should == '/usr/local'
+ @installer.prefix.should == '/usr/local'
end
it 'should support customized source area' do
- @installer.archives.first.should == '/usr/local/archives'
+ @installer.archives.should == '/usr/local/archives'
end
it 'should support customized install area' do
- @installer.builds.first.should == '/usr/local/builds'
+ @installer.builds.should == '/usr/local/builds'
end
end
describe 'during gnu source archive style installation' do
@@ -283,13 +283,20 @@
end
it 'should run all pre-prepare commands' do
@commands.each { |k, v| @installer.should_receive(:pre_commands).with(k).and_return(v) }
end
+
+ it "should be logged" do
+ pending
+ end
it 'should be run relative to the source build area' do
- @commands.each { |stage, command| @installer.send(:pre_commands, stage).first.should =~ %r{cd /usr/builds/ruby-1.8.6-p111} }
+ [:prepare, :download, :extract].each { |stage, command|
+ @installer.send(:pre_commands, stage).first.should_not =~ %r{cd /usr/builds/ruby-1.8.6-p111} }
+ [:configure, :build, :install].each { |stage, command|
+ @installer.send(:pre_commands, stage).first.should =~ %r{cd /usr/builds/ruby-1.8.6-p111} }
end
after do
@installer.send :install_sequence
end
@@ -316,10 +323,13 @@
it 'should run all post-prepare commands' do
@commands.each { |k, v| @installer.should_receive(:post_commands).with(k).and_return(v) }
end
it 'should be run relative to the source build area' do
- @commands.each { |stage, command| @installer.send(:post_commands, stage).first.should =~ %r{cd /usr/builds/ruby-1.8.6-p111} }
+ [:prepare, :download].each { |stage, command|
+ @installer.send(:post_commands, stage).first.should_not =~ %r{cd /usr/builds/ruby-1.8.6-p111} }
+ [:extract, :configure, :build, :install].each { |stage, command|
+ @installer.send(:post_commands, stage).first.should =~ %r{cd /usr/builds/ruby-1.8.6-p111} }
end
after do
@installer.send :install_sequence
end