Sha256: 18df256db2ce49113db29dea107a4f672222daed049f8195846c1f7ad2d6950c

Contents?: true

Size: 952 Bytes

Versions: 2

Compression:

Stored size: 952 Bytes

Contents

require 'spec_helper'

describe "@include shift()" do
  let (:identifier) {"shift"}

  before(:all) do
    ParserSupport.parse_file(identifier)
  end

  context "with no argument" do
    it "shifts element one column to the left" do
      expect('.shift-default').to have_rule('margin-left: 8.5298%')
    end
  end

  context "with argument '2'" do
    it "shifts element 2 column to the left" do
      expect('.shift-positive').to have_rule('margin-left: 17.05961%')
    end
  end

  context "with argument '-3'" do
    it "shifts element 3 column to the right" do
      expect('.shift-negative').to have_rule('margin-left: -25.58941%')
    end
  end

  context "when nested" do
    it "shifts element relative to its parent" do
      expect('.shifted-parent .shifted-child').to have_rule('margin-left: 34.94305%')
    end

    it "resets nesting context" do
      expect('.post-nested-shift').to have_rule('margin-left: 17.05961%')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
neat-1.2.1 spec/neat/shift_spec.rb
neat-1.2.0 spec/neat/shift_spec.rb