fixed sprite rsspec cli test to change back to the correct directory

This commit is contained in:
Scott Davis 2011-04-01 12:14:45 -04:00
parent f83f85406c
commit 23f0f03a09
3 changed files with 22 additions and 22 deletions

View File

@ -7,7 +7,7 @@ GIT
PATH
remote: .
specs:
compass (0.11.beta.5.da2af62)
compass (0.11.beta.5.f83f854)
chunky_png (~> 1.1.0)
sass (>= 3.1.0.alpha.249)

View File

@ -17,10 +17,8 @@ describe Compass::Commands::Sprite do
def run_compass_with_options(options)
output = 'foo'
::Dir.chdir @test_dir do
output = Compass::Exec::SubCommandUI.new(options).run!
end
output
::Dir.chdir @test_dir
%x{compass #{options.join(' ')}}
end
def options_to_cli(options)
@ -29,6 +27,7 @@ describe Compass::Commands::Sprite do
let(:test_dir) { @test_dir }
before :each do
@before_dir = ::Dir.pwd
create_temp_cli_dir
create_sprite_temp
File.open(File.join(@test_dir, 'config.rb'), 'w') do |f|
@ -36,6 +35,7 @@ describe Compass::Commands::Sprite do
end
end
after :each do
::Dir.chdir @before_dir
clean_up_sprites
if File.exists?(@test_dir)
::FileUtils.rm_r @test_dir

View File

@ -73,7 +73,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-161c60ad78.png') no-repeat;
background: url('/squares-161c60ad78.png') no-repeat;
}
.squares-ten-by-ten {
@ -96,7 +96,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-161c60ad78.png') no-repeat;
background: url('/squares-161c60ad78.png') no-repeat;
}
.squares-ten-by-ten {
@ -128,7 +128,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .cubicle, .large-cube {
background: url('/images/squares-161c60ad78.png') no-repeat;
background: url('/squares-161c60ad78.png') no-repeat;
}
.cubicle {
@ -153,7 +153,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.circles {
background: url('/images/squares-161c60ad78.png') no-repeat;
background: url('/squares-161c60ad78.png') no-repeat;
}
CSS
image_size('squares-*.png').should == [20, 30]
@ -167,7 +167,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-89450808af.png') no-repeat;
background: url('/squares-89450808af.png') no-repeat;
}
.squares-ten-by-ten {
@ -189,7 +189,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-673837183a.png') no-repeat;
background: url('/squares-673837183a.png') no-repeat;
}
.squares-ten-by-ten {
@ -212,7 +212,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-1cd84c9068.png') no-repeat;
background: url('/squares-1cd84c9068.png') no-repeat;
}
.squares-ten-by-ten {
@ -235,7 +235,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-f25b7090ca.png') no-repeat;
background: url('/squares-f25b7090ca.png') no-repeat;
}
.squares-ten-by-ten {
@ -257,7 +257,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-d66bf24bab.png') no-repeat;
background: url('/squares-d66bf24bab.png') no-repeat;
}
.squares-ten-by-ten {
@ -292,7 +292,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite {
background: url('/images/squares-8e490168dd.png') no-repeat;
background: url('/squares-8e490168dd.png') no-repeat;
}
.adjusted-percentage {
@ -330,7 +330,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .adjusted-percentage, .adjusted-px-1, .adjusted-px-2 {
background: url('/images/squares-8e490168dd.png') no-repeat;
background: url('/squares-8e490168dd.png') no-repeat;
}
.adjusted-percentage {
@ -357,7 +357,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-a5550fd132.png') no-repeat;
background: url('/squares-a5550fd132.png') no-repeat;
}
.squares-ten-by-ten {
@ -381,7 +381,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
background: url('/images/squares-89a274044e.png') no-repeat;
background: url('/squares-89a274044e.png') no-repeat;
}
.squares-ten-by-ten {
@ -433,7 +433,7 @@ describe Compass::Sprites do
SCSS
actual_css.should == <<-CSS
.squares {
background: url('/images/squares-145869726f.png') 0 -10px no-repeat;
background: url('/squares-145869726f.png') 0 -10px no-repeat;
}
CSS
end
@ -452,7 +452,7 @@ describe Compass::Sprites do
image_size('squares-*.png').should == [20, 40]
css.should == <<-CSS
.squares-sprite {
background: url('/images/squares-e3c68372d9.png') no-repeat;
background: url('/squares-e3c68372d9.png') no-repeat;
}
.foo {
@ -472,7 +472,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.selectors-sprite, .selectors-ten-by-ten {
background: url('/images/selectors-edfef809e2.png') no-repeat;
background: url('/selectors-edfef809e2.png') no-repeat;
}
.selectors-ten-by-ten {
@ -499,7 +499,7 @@ describe Compass::Sprites do
SCSS
css.should == <<-CSS
.selectors-sprite, a {
background: url('/images/selectors-edfef809e2.png') no-repeat;
background: url('/selectors-edfef809e2.png') no-repeat;
}
a {