spec/unit/pr/fields/generic_field_spec.rb in pr-0.0.6 vs spec/unit/pr/fields/generic_field_spec.rb in pr-0.0.7
- old
+ new
@@ -5,35 +5,33 @@
let(:value) { double "value" }
let(:options) { Hash.new }
let(:field) { klass.new value, options }
describe "default value" do
- subject { klass.new }
-
- its(:raw) { should == nil }
- its(:convert) { should == nil }
- its(:options) { should == {} }
+ specify { expect(klass.new.raw).to eq nil }
+ specify { expect(klass.new.convert).to eq nil }
+ specify { expect(klass.new.options).to eq({}) }
end
describe '#options' do
it 'has retrievable options' do
expect(field.options).to eq options
end
end
describe :raw do
it "should return the value the field was initialized with" do
- field.raw.should == value
+ expect(field.raw).to eq(value)
end
end
describe "#populate" do
subject { field.populate value }
- specify { field.raw.should == value }
+ specify { expect(field.raw).to eq(value) }
end
describe :convert do
it "should return the raw value" do
- field.convert.should == value
+ expect(field.convert).to eq(value)
end
end
end