frameworks-capybara 0.1.15 → 0.1.16

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.
data/Gemfile.lock CHANGED
@@ -26,8 +26,11 @@ GEM
26
26
  culerity (0.2.15)
27
27
  diff-lcs (1.1.3)
28
28
  ffi (1.0.9)
29
+ ffi (1.0.9-x86-mingw32)
29
30
  gherkin (2.5.1)
30
31
  json (>= 1.4.6)
32
+ gherkin (2.5.1-x86-mingw32)
33
+ json (>= 1.4.6)
31
34
  git (1.2.5)
32
35
  jeweler (1.5.2)
33
36
  bundler (~> 1.0.0)
@@ -39,6 +42,7 @@ GEM
39
42
  nokogiri (>= 1.2.1)
40
43
  mime-types (1.16)
41
44
  nokogiri (1.5.0)
45
+ nokogiri (1.5.0-x86-mingw32)
42
46
  rack (1.3.3)
43
47
  rack-test (0.6.1)
44
48
  rack (>= 1.0)
@@ -68,6 +72,7 @@ GEM
68
72
 
69
73
  PLATFORMS
70
74
  ruby
75
+ x86-mingw32
71
76
 
72
77
  DEPENDENCIES
73
78
  bundler (~> 1.0.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.15
1
+ 0.1.16
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{frameworks-capybara}
8
- s.version = "0.1.15"
8
+ s.version = "0.1.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcrmfc"]
12
- s.date = %q{2012-02-27}
12
+ s.date = %q{2012-02-29}
13
13
  s.description = %q{gem to aid setup of Capybara for testing bbc sites}
14
14
  s.email = %q{mcrobbins@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -103,6 +103,10 @@ class CapybaraSetup
103
103
  profile["network.proxy.http_port"] = 80
104
104
  profile["network.proxy.ssl_port"] = 80
105
105
  profile.native_events = true
106
+ elsif(profile_name == 'DISABLED_REFERER')
107
+ profile = Selenium::WebDriver::Firefox::Profile.new
108
+ profile["network.http.sendRefererHeader"] = 0
109
+ profile.native_events = true
106
110
  else
107
111
  profile = Selenium::WebDriver::Firefox::Profile.from_name profile_name
108
112
  profile.native_events = true
@@ -37,8 +37,10 @@ describe CapybaraSetup do
37
37
 
38
38
  before(:each) do
39
39
  home = ENV['HOME']
40
+ appdata = ENV['APPDATA']
40
41
  ENV.clear
41
42
  ENV['HOME'] = home #Want to clear some env variables but HOME is used by Webdriver, therefore need to preserve it
43
+ ENV['APPDATA'] = appdata
42
44
  end
43
45
 
44
46
  describe "should validate options" do
@@ -110,7 +112,7 @@ describe CapybaraSetup do
110
112
 
111
113
  end
112
114
 
113
- context "with Selenium driver and programtically cretated profile" do
115
+ context "with Selenium driver and programtically created profile" do
114
116
  before do
115
117
  ENV['BROWSER'] = 'firefox'
116
118
  ENV['FIREFOX_PROFILE'] = 'BBC_INTERNAL'
@@ -134,6 +136,24 @@ describe CapybaraSetup do
134
136
  it_behaves_like "Selenium Driver Options Array"
135
137
  end
136
138
 
139
+
140
+ context "with Selenium driver and programtically created profile with referer disabled" do
141
+ before do
142
+ ENV['BROWSER'] = 'firefox'
143
+ ENV['FIREFOX_PROFILE'] = 'DISABLED_REFERER'
144
+ end
145
+
146
+ it "should be initialized correctly" do
147
+ Capybara.delete_session
148
+ CapybaraSetup.new.driver.should == :selenium
149
+ Capybara.current_session.driver.should be_a_kind_of Capybara::Driver::Selenium
150
+ Capybara.current_session.driver.options[:browser].should == :firefox
151
+ Capybara.current_session.driver.options[:profile].should be_a_kind_of Selenium::WebDriver::Firefox::Profile
152
+ Capybara.current_session.driver.options[:profile].instance_variable_get(:@additional_prefs)['network.http.sendRefererHeader'].should == '0'
153
+ end
154
+ it_behaves_like "Selenium Driver Options Array"
155
+ end
156
+
137
157
  context "with Selenium driver and custom chrome options" do
138
158
  before do
139
159
  ENV['BROWSER'] = 'chrome'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frameworks-capybara
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 15
10
- version: 0.1.15
9
+ - 16
10
+ version: 0.1.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - mcrmfc
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-27 00:00:00 +00:00
18
+ date: 2012-02-29 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency