spec/unit/pr/fields/float_field_spec.rb in pr-0.0.6 vs spec/unit/pr/fields/float_field_spec.rb in pr-0.0.7

- old
+ new

@@ -6,13 +6,12 @@ let(:value) { double "value" } let(:options) { Hash.new } let(:field) { klass.new value, options } describe "default value" do - subject { klass.new } - its(:raw) { should == '' } - its(:options) { should == {} } + specify { expect(klass.new.raw).to eq '' } + specify { expect(klass.new.options).to eq({}) } end describe '#options' do it 'has retrievable options' do expect(field.options).to eq options @@ -29,19 +28,19 @@ let(:value) { 3.141 } let(:field) { klass.new } subject { field.populate value } - specify { subject; field.raw.should == "3.141" } + specify { subject; expect(field.raw).to eq("3.141") } end describe "#convert" do context "where passed a stringified float value" do let(:value) { "3.4" } it "should return the float intepretation" do - field.convert.should == 3.4 + expect(field.convert).to eq(3.4) end end context "where passed a string not containing a float value" do let(:value) { "One Point Oh" }