| 1 | require "spec_helper" |
| 2 | |
| 3 | describe "@include grid-media() {...}" do |
| 4 | before(:all) do |
| 5 | ParserSupport.parse_file("mixins/grid-media") |
| 6 | end |
| 7 | |
| 8 | context "with argument ($custom-neat-grid)" do |
| 9 | it "outputs @media only screen and (min-width: 1000px)" do |
| 10 | expect(".grid-column-media-custom-neat-grid").to be_contained_in("only screen and (min-width: 1000px)") |
| 11 | end |
| 12 | end |
| 13 | |
| 14 | context "with argument ($specific-neat-grid)" do |
| 15 | it "outputs @media only screen and (min-width: 1000px) and (max-width: 1100px)" do |
| 16 | expect(".grid-column-media-specific-neat-grid").to be_contained_in("only screen and (min-width: 1000px) and (max-width: 1100px)") |
| 17 | end |
| 18 | end |
| 19 | |
| 20 | context "with argument ($print-neat-grid)" do |
| 21 | it "outputs @media print" do |
| 22 | expect(".grid-column-media-print-neat-grid").to be_contained_in("print") |
| 23 | end |
| 24 | end |
| 25 | |
| 26 | context "with argument ($custom-neat-grid, $specific-neat-grid, $print-neat-grid)" do |
| 27 | it "outputs @media only screen and (min-width: 1000px)" do |
| 28 | expect(".grid-column-media-combined-grid").to be_contained_in("only screen and (min-width: 1000px)") |
| 29 | end |
| 30 | |
| 31 | it "outputs @media only screen and (min-width: 1000px) and (max-width: 1100px)" do |
| 32 | expect(".grid-column-media-combined-grid").to be_contained_in("only screen and (min-width: 1000px) and (max-width: 1100px)") |
| 33 | end |
| 34 | |
| 35 | it "outputs @media print" do |
| 36 | expect(".grid-column-media-combined-grid").to be_contained_in("print") |
| 37 | end |
| 38 | end |
| 39 | end |