frameworks-capybara 0.2.34 → 0.3.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,124 +0,0 @@
1
- require 'spec_helper'
2
- require 'rspec/mocks/mock'
3
- require 'uri'
4
-
5
- describe Capybara::Mechanize::Browser do
6
-
7
- RSpec::Mocks::setup(self)
8
-
9
- it "shouldn't send referer if unknown" do
10
-
11
- agent = double()
12
- agent.stub('get' => true)
13
- agent.should_receive('get').with(
14
- "http://example.bbc.co.uk/test",
15
- {},
16
- nil,
17
- {}
18
- )
19
-
20
- driver = double("Capybara::Mechanize::Driver")
21
-
22
- browser = Capybara::Mechanize::Browser.new(driver)
23
- browser.stub('current_url' => "")
24
- browser.stub('agent' => agent)
25
-
26
- browser.process_remote_request(:get, 'http://example.bbc.co.uk/test', {}, {})
27
- end
28
-
29
- it "should not change behaviour for POST requests" do
30
-
31
- agent = double()
32
- agent.stub('post' => true)
33
- agent.should_receive('post').with("http://example.bbc.co.uk/test")
34
-
35
- driver = double("Capybara::Mechanize::Driver")
36
-
37
- browser = Capybara::Mechanize::Browser.new(driver)
38
- browser.stub('current_url' => "http://example.bbc.co.uk/blah")
39
- browser.stub('agent' => agent)
40
-
41
- browser.process_remote_request(:post, 'http://example.bbc.co.uk/test', {}, {})
42
- end
43
-
44
- it "should not send referer for requests from HTTPs to HTTP" do
45
-
46
- agent = double()
47
- agent.stub('get' => true)
48
- agent.should_receive('get').with(
49
- "http://example.bbc.co.uk/test",
50
- {},
51
- nil,
52
- {}
53
- )
54
-
55
- driver = double("Capybara::Mechanize::Driver")
56
-
57
- browser = Capybara::Mechanize::Browser.new(driver)
58
- browser.stub('current_url' => "https://example.bbc.co.uk/blah")
59
- browser.stub('agent' => agent)
60
-
61
- browser.process_remote_request(:get, 'http://example.bbc.co.uk/test', {}, {})
62
- end
63
-
64
- it "should send referer for requests from HTTP to HTTPs" do
65
-
66
- agent = double()
67
- agent.stub('get' => true)
68
- agent.should_receive('get').with(
69
- "https://example.bbc.co.uk/test",
70
- {},
71
- "http://example.bbc.co.uk/blah",
72
- {}
73
- )
74
-
75
- driver = double("Capybara::Mechanize::Driver")
76
-
77
- browser = Capybara::Mechanize::Browser.new(driver)
78
- browser.stub('current_url' => "http://example.bbc.co.uk/blah")
79
- browser.stub('agent' => agent)
80
-
81
- browser.process_remote_request(:get, 'https://example.bbc.co.uk/test', {}, {})
82
- end
83
-
84
- it "should send referer for requests from HTTP to HTTP" do
85
-
86
- agent = double()
87
- agent.stub('get' => true)
88
- agent.should_receive('get').with(
89
- "http://example.bbc.co.uk/test",
90
- {},
91
- "http://example.bbc.co.uk/blah",
92
- {}
93
- )
94
-
95
- driver = double("Capybara::Mechanize::Driver")
96
-
97
- browser = Capybara::Mechanize::Browser.new(driver)
98
- browser.stub('current_url' => "http://example.bbc.co.uk/blah")
99
- browser.stub('agent' => agent)
100
-
101
- browser.process_remote_request(:get, 'http://example.bbc.co.uk/test', {}, {})
102
- end
103
-
104
- it "should send referer for requests from HTTPs to HTTPs" do
105
-
106
- agent = double()
107
- agent.stub('get' => true)
108
- agent.should_receive('get').with(
109
- "https://example.bbc.co.uk/test",
110
- {},
111
- "https://example.bbc.co.uk/blah",
112
- {}
113
- )
114
-
115
- driver = double("Capybara::Mechanize::Driver")
116
-
117
- browser = Capybara::Mechanize::Browser.new(driver)
118
- browser.stub('current_url' => "https://example.bbc.co.uk/blah")
119
- browser.stub('agent' => agent)
120
-
121
- browser.process_remote_request(:get, 'https://example.bbc.co.uk/test', {}, {})
122
- end
123
-
124
- end
@@ -1,10 +0,0 @@
1
- # Mozilla User Preferences
2
-
3
- /* Do not edit this file.
4
- *
5
- * If you make changes to this file while the application is running,
6
- * the changes will be overwritten when the application exits.
7
- *
8
- * To make a manual change to preferences, you can visit the URL about:config
9
- * For more information, see http://www.mozilla.org/unix/customizing.html#prefs
10
- */
data/spec/profiles.ini DELETED
@@ -1,8 +0,0 @@
1
- [General]
2
- StartWithLastProfile=1
3
-
4
- [Profile0]
5
- Name=default
6
- IsRelative=1
7
- Path=mock.default
8
- Default=1
@@ -1,17 +0,0 @@
1
- module Selenium
2
- module WebDriver
3
- module Firefox
4
-
5
- # @api private
6
- module Util
7
- module_function
8
-
9
- def app_data_path
10
- File.dirname(__FILE__)
11
- end
12
-
13
- end # Util
14
- end # Firefox
15
- end # WebDriver
16
- end # Selenium
17
-