Skip to content
This repository
Browse code

Improve media() spec descriptions

  • Loading branch information...
commit cf6f5eae854ce2a3696ab4240cdfdf3589a28ef4 1 parent 62ecf7e
Reda Lemeden kaishin authored

Showing 2 changed files with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. +2 2 Rakefile
  2. +7 7 spec/neat/media_spec.rb
4 Rakefile
@@ -12,11 +12,11 @@ task :test do
12 12 `bourbon install --path test`
13 13 puts "Generating CSS..."
14 14 `sass --watch test:css/ --style expanded`
15   -end # task :test
  15 +end
16 16
17 17 task :clean do
18 18 puts "Deleting Bourbon directory..."
19 19 `rm -rf test/bourbon`
20 20 puts "Deleting generated CSS..."
21 21 `rm -rf css/`
22   -end # task :clean
  22 +end
14 spec/neat/media_spec.rb
@@ -8,25 +8,25 @@
8 8 end
9 9
10 10 context "with argument '481px'" do
11   - it "outputs (min-width: 481px)" do
  11 + it "outputs @media screen and (min-width: 481px)" do
12 12 expect('.media-default').to be_contained_in('screen and (min-width: 481px)')
13 13 end
14 14 end
15 15
16 16 context "with argument 'max-width 480px'" do
17   - it "outputs (max-width: 480px)" do
  17 + it "outputs @media screen and (max-width: 480px)" do
18 18 expect('.media-max-width').to be_contained_in('screen and (max-width: 480px)')
19 19 end
20 20 end
21 21
22 22 context "with argument 'min-width 320px max-width 480px'" do
23   - it "outputs (min-width: 320px) and (max-width: 480px)" do
  23 + it "outputs @media screen and (min-width: 320px) and (max-width: 480px)" do
24 24 expect('.media-min-max-width').to be_contained_in('screen and (min-width: 320px) and (max-width: 480px)')
25 25 end
26 26 end
27 27
28 28 context "with argument '481px, 6'" do
29   - it "outputs (min-width: 481px)" do
  29 + it "outputs @media screen and (min-width: 481px)" do
30 30 expect('.change-media-context').to be_contained_in('screen and (min-width: 481px)')
31 31 end
32 32
@@ -35,13 +35,13 @@
35 35 end
36 36 end
37 37
38   - context "with argument 'max-width 480px 6'" do
39   - it "outputs (max-width: 480px)" do
  38 + context "with shorthand argument 'max-width 480px 6'" do
  39 + it "outputs @media screen and (max-width: 480px)" do
40 40 expect('.change-media-context-shorthand').to be_contained_in('screen and (max-width: 480px)')
41 41 end
42 42
43 43 it "uses a 6-column grid" do
44   - expect('.change-media-context').to have_rule('width: 100%')
  44 + expect('.change-media-context-shorthand').to have_rule('width: 100%')
45 45 end
46 46 end
47 47 end

0 comments on commit cf6f5ea

Please sign in to comment.
Something went wrong with that request. Please try again.