fixed sprite rsspec cli test to change back to the correct directory
This commit is contained in:
parent
f83f85406c
commit
23f0f03a09
@ -7,7 +7,7 @@ GIT
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
compass (0.11.beta.5.da2af62)
|
compass (0.11.beta.5.f83f854)
|
||||||
chunky_png (~> 1.1.0)
|
chunky_png (~> 1.1.0)
|
||||||
sass (>= 3.1.0.alpha.249)
|
sass (>= 3.1.0.alpha.249)
|
||||||
|
|
||||||
|
@ -17,10 +17,8 @@ describe Compass::Commands::Sprite do
|
|||||||
|
|
||||||
def run_compass_with_options(options)
|
def run_compass_with_options(options)
|
||||||
output = 'foo'
|
output = 'foo'
|
||||||
::Dir.chdir @test_dir do
|
::Dir.chdir @test_dir
|
||||||
output = Compass::Exec::SubCommandUI.new(options).run!
|
%x{compass #{options.join(' ')}}
|
||||||
end
|
|
||||||
output
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def options_to_cli(options)
|
def options_to_cli(options)
|
||||||
@ -29,6 +27,7 @@ describe Compass::Commands::Sprite do
|
|||||||
|
|
||||||
let(:test_dir) { @test_dir }
|
let(:test_dir) { @test_dir }
|
||||||
before :each do
|
before :each do
|
||||||
|
@before_dir = ::Dir.pwd
|
||||||
create_temp_cli_dir
|
create_temp_cli_dir
|
||||||
create_sprite_temp
|
create_sprite_temp
|
||||||
File.open(File.join(@test_dir, 'config.rb'), 'w') do |f|
|
File.open(File.join(@test_dir, 'config.rb'), 'w') do |f|
|
||||||
@ -36,6 +35,7 @@ describe Compass::Commands::Sprite do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
after :each do
|
after :each do
|
||||||
|
::Dir.chdir @before_dir
|
||||||
clean_up_sprites
|
clean_up_sprites
|
||||||
if File.exists?(@test_dir)
|
if File.exists?(@test_dir)
|
||||||
::FileUtils.rm_r @test_dir
|
::FileUtils.rm_r @test_dir
|
||||||
|
@ -73,7 +73,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -96,7 +96,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -128,7 +128,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .cubicle, .large-cube {
|
.squares-sprite, .cubicle, .large-cube {
|
||||||
background: url('/images/squares-161c60ad78.png') no-repeat;
|
background: url('/squares-161c60ad78.png') no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cubicle {
|
.cubicle {
|
||||||
@ -153,7 +153,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.circles {
|
.circles {
|
||||||
background: url('/images/squares-161c60ad78.png') no-repeat;
|
background: url('/squares-161c60ad78.png') no-repeat;
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
image_size('squares-*.png').should == [20, 30]
|
image_size('squares-*.png').should == [20, 30]
|
||||||
@ -167,7 +167,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -189,7 +189,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -212,7 +212,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -235,7 +235,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -257,7 +257,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -292,7 +292,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background: url('/images/squares-8e490168dd.png') no-repeat;
|
background: url('/squares-8e490168dd.png') no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.adjusted-percentage {
|
.adjusted-percentage {
|
||||||
@ -330,7 +330,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .adjusted-percentage, .adjusted-px-1, .adjusted-px-2 {
|
.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 {
|
.adjusted-percentage {
|
||||||
@ -357,7 +357,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -381,7 +381,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.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 {
|
.squares-ten-by-ten {
|
||||||
@ -433,7 +433,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
actual_css.should == <<-CSS
|
actual_css.should == <<-CSS
|
||||||
.squares {
|
.squares {
|
||||||
background: url('/images/squares-145869726f.png') 0 -10px no-repeat;
|
background: url('/squares-145869726f.png') 0 -10px no-repeat;
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
end
|
end
|
||||||
@ -452,7 +452,7 @@ describe Compass::Sprites do
|
|||||||
image_size('squares-*.png').should == [20, 40]
|
image_size('squares-*.png').should == [20, 40]
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background: url('/images/squares-e3c68372d9.png') no-repeat;
|
background: url('/squares-e3c68372d9.png') no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foo {
|
.foo {
|
||||||
@ -472,7 +472,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.selectors-sprite, .selectors-ten-by-ten {
|
.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 {
|
.selectors-ten-by-ten {
|
||||||
@ -499,7 +499,7 @@ describe Compass::Sprites do
|
|||||||
SCSS
|
SCSS
|
||||||
css.should == <<-CSS
|
css.should == <<-CSS
|
||||||
.selectors-sprite, a {
|
.selectors-sprite, a {
|
||||||
background: url('/images/selectors-edfef809e2.png') no-repeat;
|
background: url('/selectors-edfef809e2.png') no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
Loading…
Reference in New Issue
Block a user