Sha256: ab5a9e60d9515d32e6fac046a56929438a5a0e32862096c8a955b0f39ada695a

Contents?: true

Size: 1.13 KB

Versions: 16

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe "@include shift()" do
  before(:all) do
    ParserSupport.parse_file("shift")
  end

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

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

  context "with argument (-3)" do
    it "shifts element 3 columns in the opposite direction" 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

  context "when layout direction changes" do
    it "shifts element in the corresponding direction" do
      expect('section .shift-negative').to have_rule('margin-right: -25.58941%')
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
neat-1.7.0 spec/neat/shift_spec.rb
neat-1.7.0.rc spec/neat/shift_spec.rb
neat-1.7.0.pre spec/neat/shift_spec.rb
poxy-0.0.6 spec/poxy/shift_spec.rb
poxy-0.0.5 spec/poxy/shift_spec.rb
poxy-0.0.4 spec/poxy/shift_spec.rb
poxy-0.0.1 spec/poxy/shift_spec.rb
poxy-0.0.0 spec/poxy/shift_spec.rb
neat-1.5.1 spec/neat/shift_spec.rb
neat-1.6.0 spec/neat/shift_spec.rb
neat-1.6.0.pre2 spec/neat/shift_spec.rb
neat-1.6.0.pre spec/neat/shift_spec.rb
neat-1.5.0 spec/neat/shift_spec.rb
neat-1.5.0.pre spec/neat/shift_spec.rb
neat-1.4.0 spec/neat/shift_spec.rb
neat-1.3.0 spec/neat/shift_spec.rb