Sha256: 514620c44191dd5a7b854f88569eae1484d9be54970e49e37f21cdd9a90b0ee2
Contents?: true
Size: 1.1 KB
Versions: 4
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' describe Sassy::SCSS::Declaration do describe ".new" do [ [], [nil], [nil, nil], ['property'], ['property', nil], [nil, 'value'], [nil, nil] ].each do |args| context "when the args are #{args.inspect}" do before { @args = args } it "raises an error" do lambda { Sassy::SCSS::Declaration.new(*@args) }.should raise_error(ArgumentError) end end end [ ['property', 'value'] ].each do |args| context "when the args are #{args.inspect}" do before { @args = args } it "returns an instance of Sassy::SCSS::Declaration" do Sassy::SCSS::Declaration.new(*@args).should be_an_instance_of(Sassy::SCSS::Declaration) end end end end describe "instance methods" do before do @d = Sassy::SCSS::Declaration.new('color', 'red') end describe "#to_scss" do context "when the property is 'color' and the value is 'red'" do it("returns 'color: red;'") { @d.to_scss.should == 'color: red;' } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems