Sha256: d0dff275af309ed7bf40583e60aa6b748fef2b69634733d553e58ad4125204da

Contents?: true

Size: 764 Bytes

Versions: 4

Compression:

Stored size: 764 Bytes

Contents

require "assert"

require 'xmlss/style/protection'

module Xmlss::Style

  class ProtectionTest < Assert::Context
    desc "Xmlss::Style::Protection"
    before { @sp = Xmlss::Style::Protection.new }
    subject { @sp }

    should have_class_method :writer
    should have_accessor :protect
    should have_instance_methods :protected?

    should "know its writer" do
      assert_equal :protection, subject.class.writer
    end

    should "set it's defaults" do
      assert_equal false, subject.protected?
    end

    should "set attrs at init time" do
      sp = Xmlss::Style::Protection.new(true)
      assert sp.protected?
    end

    should "set attrs after init time" do
      subject.protect = true
      assert subject.protected?
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
xmlss-1.0.0.rc.4 test/style/protection_test.rb
xmlss-1.0.0.rc.3 test/style/protection_test.rb
xmlss-1.0.0.rc.2 test/style/protection_test.rb
xmlss-1.0.0.rc.1 test/style/protection_test.rb