spec/motion/util/constants_spec.rb in bubble-wrap-1.2.0 vs spec/motion/util/constants_spec.rb in bubble-wrap-1.3.0.osx

- old
+ new

@@ -1,8 +1,8 @@ describe BubbleWrap::Constants do describe ".get" do - BubbleWrap::Constants.register UIReturnKeyDone, UIReturnKeyNext + BubbleWrap::Constants.register NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation it "should return integer passed" do BW::Constants.get("anything", 5).should == 5 end @@ -10,17 +10,17 @@ it "should return integer for decimal passed" do BW::Constants.get("anything", 5.0).should == 5 end it "should return the correct integer for a string" do - BW::Constants.get("UIReturnKey", "done").should == UIReturnKeyDone + BW::Constants.get("NSStringEncodingConversion", "allow_lossy").should == NSStringEncodingConversionAllowLossy end it "should return the correct integer for a symbol" do - BW::Constants.get("UIReturnKey", :done).should == UIReturnKeyDone + BW::Constants.get("NSStringEncodingConversion", :allow_lossy).should == NSStringEncodingConversionAllowLossy end it "should bitmask array values" do - BW::Constants.get("UIReturnKey", :done, :next).should == (UIReturnKeyDone | UIReturnKeyNext) + BW::Constants.get("NSStringEncodingConversion", :allow_lossy, :external_representation).should == (NSStringEncodingConversionAllowLossy | NSStringEncodingConversionExternalRepresentation) end end end