spec/unit_spec.rb in phys-units-0.9.3 vs spec/unit_spec.rb in phys-units-0.9.4
- old
+ new
@@ -36,11 +36,11 @@
describe U['pi'] do
it {should be_an_kind_of Phys::Unit}
its(:factor) {should == 1}
its(:conversion_factor) {should == Math::PI}
its(:name) {should == 'pi'}
- its(:expr) {should be_nil}
+ its(:expr) {should == '!dimensionless'}
its(:offset) {should be_nil}
its(:dimension) {should == {'pi'=>1}}
its(:dimension_value) {should == Math::PI}
its(:string_form) {should == "pi"}
it {should be_dimensionless}
@@ -51,11 +51,11 @@
describe U['m'] do
it {should be_an_kind_of Phys::Unit}
its(:factor) {should == 1}
its(:conversion_factor) {should == 1}
its(:name) {should == 'm'}
- its(:expr) {should be_nil}
+ its(:expr) {should == '!'}
its(:offset) {should be_nil}
its(:dimension) {should == {'m'=>1}}
its(:dimension_value) {should == 1}
its(:string_form) {should == "m"}
it {should_not be_dimensionless}
@@ -171,9 +171,10 @@
its(:dimension_value) {should == 1}
its(:string_form) {should == "m s^-1"}
it {should_not be_dimensionless}
it {should_not be_scalar}
it {should be_operable}
+ it {should === Q[1,'miles/hr']}
end
describe U.parse('(m/s)**2') do
it {should be_an_instance_of Phys::Unit}
its(:factor) {should == 1}