spec/hashme/base_spec.rb in hashme-0.1.2 vs spec/hashme/base_spec.rb in hashme-0.2.0
- old
+ new
@@ -9,14 +9,14 @@
end
end
describe '.build' do
it "should create a Model and give a block to build it" do
- @model.should_receive(:call_in_block)
+ expect(@model).to receive(:call_in_block)
@model.build do |model|
@model.call_in_block
- model.should be_kind_of(@model)
+ expect(model).to be_kind_of(@model)
end
end
end
describe "#initialize" do
@@ -27,18 +27,17 @@
}.to_not raise_error
end
it "should accept and set attributes" do
@obj = @model.new(:name => "Sam")
- @obj.name.should eql("Sam")
+ expect(@obj.name).to eql("Sam")
end
it "should set default values so they are accessible by hash" do
@model.property :surname, String, :default => "Nowl"
@obj = @model.new
- @obj.to_hash[:surname].should eql('Nowl')
+ expect(@obj.to_hash[:surname]).to eql('Nowl')
end
-
end
end