Sha256: eb62aeedf30169b491502a9d1d3df624d6590113c17a6cec53479106eb6304a4

Contents?: true

Size: 811 Bytes

Versions: 4

Compression:

Stored size: 811 Bytes

Contents

require 'spec_helper'

describe Sassy::SCSS::DeclarationSet do

  describe ".new" do
    it "returns an instance of Sassy::SCSS::DeclarationSet" do
      Sassy::SCSS::DeclarationSet.new.should be_an_instance_of(Sassy::SCSS::DeclarationSet)
    end
  end

  describe "instance methods" do
    before { @ds = Sassy::SCSS::DeclarationSet.new }

    describe "#add" do
      it "creates a declaration with the args" do
        args = ["background", "green"]
        Sassy::SCSS::Declaration.should_receive(:new).with(*args)
        @ds.add(*args)
      end

      it "adds the declaration to the set" do
        declaration = mock(Sassy::SCSS::Declaration)
        Sassy::SCSS::Declaration.stub!(:new => declaration)
        @ds.add
        @ds.send(:set).should be_include(declaration)
      end
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sassy-1.0.0 spec/lib/sassy/scss/declaration_set_spec.rb
sassy-0.0.3 spec/lib/sassy/scss/declaration_set_spec.rb
sassy-0.0.2 spec/lib/sassy/scss/declaration_set_spec.rb
sassy-0.0.1 spec/lib/sassy/scss/declaration_set_spec.rb