Guest User

Untitled

a guest
Feb 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. describe String, "param parsing" do
  2. before(:each) do
  3. @result = { "foo" => "bar", "this" => "that" }
  4. end
  5.  
  6. it "scans then injects" do
  7. "foo=bar&this=that&".scan_then_inject.should == @result
  8. end
  9.  
  10. it "scans groups then injects" do
  11. "foo=bar&this=that&".scan_groups_then_inject.should == @result
  12. end
  13.  
  14. it "scans splat hashes" do
  15. "foo=bar&this=that&".scan_then_splat_hash.should == @result
  16. end
  17.  
  18. it "splits then splat hashes" do
  19. "foo=bar&this=that&".split_then_splat_hash.should == @result
  20. end
  21. end
Add Comment
Please, Sign In to add comment