spec/unit/pr/fields/boolean_field_spec.rb in pr-0.0.6 vs spec/unit/pr/fields/boolean_field_spec.rb in pr-0.0.7
- old
+ new
@@ -7,13 +7,13 @@
let(:field) { klass.new value, options }
describe "default value" do
subject { klass.new }
- its(:raw) { should equal(false) }
- its(:convert) { should equal(false) }
- its(:options) { should == {} }
+ specify { expect(subject.raw).to equal(false) }
+ specify { expect(subject.convert).to equal(false) }
+ specify { expect(subject.options).to eq({}) }
end
describe '#options' do
it 'has retrievable options' do
expect(field.options).to eq options
@@ -22,11 +22,11 @@
describe :raw do
let(:converted_value) { double "converted_value" }
it "should return the converted value" do
- field.should_receive(:convert).and_return(converted_value)
- field.raw.should == converted_value
+ expect(field).to receive(:convert).and_return(converted_value)
+ expect(field.raw).to eq(converted_value)
end
end
describe "#populate" do
specify { field.populate(true); expect(field.raw).to equal true }