Skip to content

Commit a571cf2

Browse files
committed
[rb] do not reference spec_helper in documentation
1 parent 897a76f commit a571cf2

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
# frozen_string_literal: true
22

3-
require 'spec_helper'
43
require 'selenium-webdriver'
54

65
RSpec.describe 'Using Selenium' do
7-
before do
8-
@driver = Selenium::WebDriver.for :chrome
9-
end
10-
116
it 'uses eight components' do
12-
@driver.get('https://www.selenium.dev/selenium/web/web-form.html')
7+
driver = Selenium::WebDriver.for :chrome
138

14-
title = @driver.title
9+
driver.get('https://www.selenium.dev/selenium/web/web-form.html')
10+
11+
title = driver.title
1512
expect(title).to eq('Web form')
1613

17-
@driver.manage.timeouts.implicit_wait = 500
14+
driver.manage.timeouts.implicit_wait = 500
1815

19-
text_box = @driver.find_element(name: 'my-text')
20-
submit_button = @driver.find_element(tag_name: 'button')
16+
text_box = driver.find_element(name: 'my-text')
17+
submit_button = driver.find_element(tag_name: 'button')
2118

2219
text_box.send_keys('Selenium')
2320
submit_button.click
2421

25-
message = @driver.find_element(id: 'message')
22+
message = driver.find_element(id: 'message')
2623
value = message.text
2724
expect(value).to eq('Received!')
25+
26+
driver.quit
2827
end
2928
end

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ In your project's `package.json`, add requirement to `dependencies`:
152152
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}}
153153
{{< /tab >}}
154154
{{< tab header="Ruby" >}}
155-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L14-L15" >}}
155+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L11-L12" >}}
156156
{{< /tab >}}
157157
{{< tab header="JavaScript" >}}
158158
{{< gh-codeblock path="examples/javascript/test/getting_started/runningTests.spec.js#L14-L15" >}}
@@ -194,11 +194,11 @@ In your project's `package.json`, add requirement to `dependencies`:
194194

195195
### Set Up
196196

197-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7-L9" >}}
197+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7" >}}
198198

199199
### Tear Down
200200

201-
{{< gh-codeblock path="examples/ruby/spec/spec_helper.rb#L30" >}}
201+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L26" >}}
202202
{{% /tab %}}
203203
{{< tab header="JavaScript" >}}
204204

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Seleniumコードの使用方法に関係なく、優れた統合開発環境が
141141
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}}
142142
{{< /tab >}}
143143
{{< tab header="Ruby" >}}
144-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L14-L15" >}}
144+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L11-L12" >}}
145145
{{< /tab >}}
146146
{{< tab header="JavaScript" >}}
147147
{{< gh-codeblock path="examples/javascript/test/getting_started/runningTests.spec.js#L14-L15" >}}
@@ -184,11 +184,11 @@ Seleniumコードの使用方法に関係なく、優れた統合開発環境が
184184

185185
### 並べる
186186

187-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7-L9" >}}
187+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7" >}}
188188

189189
### 取り壊す
190190

191-
{{< gh-codeblock path="examples/ruby/spec/spec_helper.rb#L30" >}}
191+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L26" >}}
192192
{{% /tab %}}
193193
{{< tab header="JavaScript" >}}
194194

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.pt-br.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ In your project's `package.json`, adicionar requisito às `dependências`:
146146
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}}
147147
{{< /tab >}}
148148
{{< tab header="Ruby" >}}
149-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L14-L15" >}}
149+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L11-L12" >}}
150150
{{< /tab >}}
151151
{{< tab header="JavaScript" >}}
152152
{{< gh-codeblock path="examples/javascript/test/getting_started/runningTests.spec.js#L14-L15" >}}
@@ -188,11 +188,11 @@ In your project's `package.json`, adicionar requisito às `dependências`:
188188

189189
### Set Up
190190

191-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7-L9" >}}
191+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7" >}}
192192

193193
### Tear Down
194194

195-
{{< gh-codeblock path="examples/ruby/spec/spec_helper.rb#L30" >}}
195+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L26" >}}
196196
{{% /tab %}}
197197
{{< tab header="JavaScript" >}}
198198

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ In your project's `package.json`, add requirement to `dependencies`:
130130
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20" >}}
131131
{{< /tab >}}
132132
{{< tab header="Ruby" >}}
133-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L14-L15" >}}
133+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L11-L12" >}}
134134
{{< /tab >}}
135135
{{< tab header="JavaScript" >}}
136136
{{< gh-codeblock path="examples/javascript/test/getting_started/runningTests.spec.js#L14-L15" >}}
@@ -172,11 +172,11 @@ In your project's `package.json`, add requirement to `dependencies`:
172172

173173
### Set Up
174174

175-
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7-L9" >}}
175+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L7" >}}
176176

177177
### Tear Down
178178

179-
{{< gh-codeblock path="examples/ruby/spec/spec_helper.rb#L30" >}}
179+
{{< gh-codeblock path="examples/ruby/spec/getting_started/using_selenium_spec.rb#L26" >}}
180180
{{% /tab %}}
181181
{{< tab header="JavaScript" >}}
182182

0 commit comments

Comments
 (0)