Sha256: 6243ea54fe87bbf856096f1ed813560640304c4a4e798456c2aa37f9b598a550
Contents?: true
Size: 370 Bytes
Versions: 7
Compression:
Stored size: 370 Bytes
Contents
require 'moosex' class BuildExample include MooseX has [:x, :y], { is: :rw, required: true, } def BUILD if self.x == self.y raise "invalid: you should use x != y" end end end describe "BuildExample" do it "should raise exception on build" do expect { BuildExample.new(x: 0, y: 0) }.to raise_error(/invalid: you should use x != y/) end end
Version data entries
7 entries across 7 versions & 1 rubygems