mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-12-22 07:18:53 -05:00
Simplify selenium setup
This commit is contained in:
parent
640d3710ae
commit
841c3a2ef3
@ -45,13 +45,11 @@ describe MailCatcher do
|
||||
end
|
||||
|
||||
def selenium
|
||||
@selenium ||= begin
|
||||
Selenium::WebDriver.for(:phantomjs).tap do |selenium|
|
||||
selenium.navigate.to("http://127.0.0.1:#{HTTP_PORT}")
|
||||
end
|
||||
end
|
||||
@selenium ||= Selenium::WebDriver.for(:phantomjs)
|
||||
end
|
||||
|
||||
before { selenium.navigate.to("http://127.0.0.1:#{HTTP_PORT}") }
|
||||
|
||||
def messages_element
|
||||
selenium.find_element(:id, "messages")
|
||||
end
|
||||
@ -96,8 +94,6 @@ describe MailCatcher do
|
||||
selenium.find_element(:tag_name, "body")
|
||||
end
|
||||
|
||||
before { selenium.navigate.refresh }
|
||||
|
||||
it "catches and displays a plain text message as plain text and source" do
|
||||
deliver_example("plainmail")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user