Sha256: e10d0eb9356479d9da3c340b269f0d9dacf7419ea9a558e53d37ed322178caa3
Contents?: true
Size: 824 Bytes
Versions: 55
Compression:
Stored size: 824 Bytes
Contents
require 'volt/models' class TestCustomClass include ReactiveTags tag_method(:cool) do destructive! end end class TestSubClass < TestCustomClass end class TestInherit < TestCustomClass tag_method(:cool) do pass_reactive! end end describe ReactiveTags do it "should tag correctly" do expect(TestCustomClass.new.reactive_method_tag(:cool, :destructive)).to eq(true) end it "should include tags in a subclass" do expect(TestSubClass.new.reactive_method_tag(:cool, :destructive)).to eq(true) expect(TestSubClass.new.reactive_method_tag(:cool, :pass_reactive)).to eq(nil) end it "should inherit" do expect(TestInherit.new.reactive_method_tag(:cool, :destructive)).to eq(true) expect(TestInherit.new.reactive_method_tag(:cool, :pass_reactive)).to eq(true) end end
Version data entries
55 entries across 55 versions & 1 rubygems