spec/propertydesc_spec.rb in mida-0.3.9 vs spec/propertydesc_spec.rb in mida-0.4.0
- old
+ new
@@ -5,35 +5,35 @@
before do
@propertyDesc = Mida::PropertyDesc.new(3)
end
it '#to_h[:num] should equal num passed' do
- @propertyDesc.to_h[:num].should == 3
+ expect(@propertyDesc.to_h[:num]).to eq(3)
end
it '#to_h[:types] should equal DataType::Text' do
- @propertyDesc.to_h[:types].should == [Mida::DataType::Text]
+ expect(@propertyDesc.to_h[:types]).to eq([Mida::DataType::Text])
end
end
describe Mida::PropertyDesc, 'when initialized with a block with no specified types' do
before do
@propertyDesc = Mida::PropertyDesc.new(3) {}
end
it '#to_h[:types] should equal DataType::Text' do
- @propertyDesc.to_h[:types].should == [Mida::DataType::Text]
+ expect(@propertyDesc.to_h[:types]).to eq([Mida::DataType::Text])
end
end
describe Mida::PropertyDesc, 'when initialized with a block that specifies types with extract()' do
before do
@propertyDesc = Mida::PropertyDesc.new(3) { extract String, Array}
end
it '#to_h[:types] should equal [String, Array]' do
- @propertyDesc.to_h[:types].should == [String, Array]
+ expect(@propertyDesc.to_h[:types]).to eq([String, Array])
end
end
describe Mida::PropertyDesc, 'when initialized with a block that specifies types with types()' do
before do
@@ -42,15 +42,15 @@
@propertyDesc = Mida::PropertyDesc.new(3) { types String, Array}
end
end
it 'should warn on initialization if types() is used in the block' do
- @error.should eq("[DEPRECATION] Mida::PropertyDesc#types is deprecated. "+
+ expect(@error).to eq("[DEPRECATION] Mida::PropertyDesc#types is deprecated. "+
"Please use Mida::PropertyDesc#extract instead."
)
end
it '#to_h[:types] should equal [String, Array]' do
- @propertyDesc.to_h[:types].should == [String, Array]
+ expect(@propertyDesc.to_h[:types]).to eq([String, Array])
end
end