spec/lib/targets_spec.rb in RDee-0.2 vs spec/lib/targets_spec.rb in RDee-0.3
- old
+ new
@@ -175,9 +175,45 @@
expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
RDee.watir_browser :safari5, url: 'http://blah'
end
end
+ context "for iPhone" do
+
+ before(:each) do
+ allow(capabilities).to receive(:iphone).and_return(desired_capabilities)
+ end
+
+ it "includes iPhone with ios 6.0" do
+ expect(desired_capabilities).to receive(:version=).with('6.0')
+ expect(desired_capabilities).to receive(:platform=).with('OS X 10.8')
+ expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
+ RDee.watir_browser :iphone_ios60, url: 'http://blah'
+ end
+
+ it "includes iPhone with ios 6.1" do
+ expect(desired_capabilities).to receive(:version=).with('6.1')
+ expect(desired_capabilities).to receive(:platform=).with('OS X 10.8')
+ expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
+ RDee.watir_browser :iphone_ios61, url: 'http://blah'
+ end
+
+ it "includes iPhone with ios 7.0" do
+ expect(desired_capabilities).to receive(:version=).with('7.0')
+ expect(desired_capabilities).to receive(:platform=).with('OS X 10.9')
+ expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
+ RDee.watir_browser :iphone_ios70, url: 'http://blah'
+ end
+
+ it "includes iPhone with ios 7.1" do
+ expect(desired_capabilities).to receive(:version=).with('7.1')
+ expect(desired_capabilities).to receive(:platform=).with('OS X 10.9')
+ expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
+ RDee.watir_browser :iphone_ios71, url: 'http://blah'
+ end
+
+ end
+
context "for hosts" do
before(:each) do
allow(capabilities).to receive(:firefox).and_return(desired_capabilities)
end