Sha256: 6bd3298dbb91796191651630df49feaac64c093f0fcc6ebf340ccb3308307573
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
require "test/helper" require "test/mixins" module Osheet class MixinBaseTest < Test::Unit::TestCase context "Osheet::Mixin thing" do subject { DefaultMixin } should_have_readers :styles, :templates should_have_instance_methods :style, :template should "set it's defaults" do assert_equal [], subject.styles assert_equal [], subject.templates end end end class MixinStyleTest < Test::Unit::TestCase context "that defines styles" do subject { StyledMixin } should "have it's styles defined" do assert_equal 2, subject.styles.size assert_equal 1, subject.styles.first.selectors.size assert_equal '.test', subject.styles.first.selectors.first assert_equal 1, subject.styles.last.selectors.size assert_equal '.test.awesome', subject.styles.last.selectors.first end end end class MixinTemplateTest < Test::Unit::TestCase context "that defines templates" do subject { TemplatedMixin } should "have it's templates defined" do assert subject.templates assert_equal 3, subject.templates.size assert_kind_of Template, subject.templates.first end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
osheet-0.6.0 | test/mixin_test.rb |
osheet-0.5.0 | test/mixin_test.rb |