spec/unit/web_spec.rb in ProMotion-2.5.0.beta1 vs spec/unit/web_spec.rb in ProMotion-2.5.0
- old
+ new
@@ -29,9 +29,18 @@
wait_for_change @webscreen, 'is_load_finished' do
@webscreen.current_url.should == 'http://mixi.jp/'
end
end
+
+ it "should open web page via NSMutableURLRequest" do
+ nsurl = NSURL.URLWithString('http://mixi.jp/')
+ @webscreen.web.loadRequest NSMutableURLRequest.requestWithURL(nsurl)
+
+ wait_for_change @webscreen, 'is_load_finished' do
+ @webscreen.current_url.should == 'http://mixi.jp/'
+ end
+ end
it "should open web page by url string" do
@webscreen.open_url('http://mixi.jp/')
wait_for_change @webscreen, 'is_load_finished' do
@webscreen.html.should =~ /mixi/