Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
Improve media() spec descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Reda Lemeden committed Mar 11, 2013
1 parent 62ecf7e commit cf6f5ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ task :test do
`bourbon install --path test`
puts "Generating CSS..."
`sass --watch test:css/ --style expanded`
end # task :test
end

task :clean do
puts "Deleting Bourbon directory..."
`rm -rf test/bourbon`
puts "Deleting generated CSS..."
`rm -rf css/`
end # task :clean
end
14 changes: 7 additions & 7 deletions spec/neat/media_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
end

context "with argument '481px'" do
it "outputs (min-width: 481px)" do
it "outputs @media screen and (min-width: 481px)" do
expect('.media-default').to be_contained_in('screen and (min-width: 481px)')
end
end

context "with argument 'max-width 480px'" do
it "outputs (max-width: 480px)" do
it "outputs @media screen and (max-width: 480px)" do
expect('.media-max-width').to be_contained_in('screen and (max-width: 480px)')
end
end

context "with argument 'min-width 320px max-width 480px'" do
it "outputs (min-width: 320px) and (max-width: 480px)" do
it "outputs @media screen and (min-width: 320px) and (max-width: 480px)" do
expect('.media-min-max-width').to be_contained_in('screen and (min-width: 320px) and (max-width: 480px)')
end
end

context "with argument '481px, 6'" do
it "outputs (min-width: 481px)" do
it "outputs @media screen and (min-width: 481px)" do
expect('.change-media-context').to be_contained_in('screen and (min-width: 481px)')
end

Expand All @@ -35,13 +35,13 @@
end
end

context "with argument 'max-width 480px 6'" do
it "outputs (max-width: 480px)" do
context "with shorthand argument 'max-width 480px 6'" do
it "outputs @media screen and (max-width: 480px)" do
expect('.change-media-context-shorthand').to be_contained_in('screen and (max-width: 480px)')
end

it "uses a 6-column grid" do
expect('.change-media-context').to have_rule('width: 100%')
expect('.change-media-context-shorthand').to have_rule('width: 100%')
end
end
end

0 comments on commit cf6f5ea

Please sign in to comment.