File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11require_relative '../spec_helper'
22
3- require 'yaml'
4- require 'rubygems'
5- require 'rubygems/safe_yaml'
6- require 'rubygems/commands/owner_command'
3+ ruby_version_is "" ..."4.0" do
74
8- describe "CVE-2019-8322 is resisted by" do
9- it "sanitising owner names" do
10- command = Gem ::Commands ::OwnerCommand . new
11- def command . rubygems_api_request ( *args )
12- Struct . new ( :body ) . new ( "---\n - email: \" \e ]2;nyan\a \" \n handle: handle\n id: id\n " )
13- end
14- def command . with_response ( response )
15- yield response
5+ require 'yaml'
6+ require 'rubygems'
7+ require 'rubygems/safe_yaml'
8+ require 'rubygems/commands/owner_command'
9+
10+ describe "CVE-2019-8322 is resisted by" do
11+ it "sanitising owner names" do
12+ command = Gem ::Commands ::OwnerCommand . new
13+ def command . rubygems_api_request ( *args )
14+ Struct . new ( :body ) . new ( "---\n - email: \" \e ]2;nyan\a \" \n handle: handle\n id: id\n " )
15+ end
16+ def command . with_response ( response )
17+ yield response
18+ end
19+ command . should_receive ( :say ) . with ( "Owners for gem: name" )
20+ command . should_receive ( :say ) . with ( "- .]2;nyan." )
21+ command . show_owners "name"
1622 end
17- command . should_receive ( :say ) . with ( "Owners for gem: name" )
18- command . should_receive ( :say ) . with ( "- .]2;nyan." )
19- command . show_owners "name"
2023 end
2124end
You can’t perform that action at this time.
0 commit comments