This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is responsible for configuring your application | |
# and its dependencies with the aid of the Mix.Config module. | |
# | |
# This configuration file is loaded before any dependency and | |
# is restricted to this project. | |
use Mix.Config | |
# Configures the endpoint | |
config :hello_phoenix, HelloPhoenix.Endpoint, | |
url: [host: "localhost"], | |
root: Path.dirname(__DIR__), | |
secret_key_base: "ur8yC0kQtT36WAwO/uORZTkCMRcnJ9UZMSHDgaLYnpkFHBy86a/8x2TeO7Lb4bga", | |
render_errors: [accepts: ~w(html json)], | |
pubsub: [name: HelloPhoenix.PubSub, | |
adapter: Phoenix.PubSub.PG2] | |
# Configures Elixir's Logger | |
config :logger, :console, | |
format: "$time $metadata[$level] $message\n", | |
metadata: [:request_id] | |
# Import environment specific config. This must remain at the bottom | |
# of this file so it overrides the configuration defined above. | |
import_config "#{Mix.env}.exs" | |
# Configure phoenix generators | |
config :phoenix, :generators, | |
migration: true, | |
binary_id: false | |
#config :hound, driver: "phantomjs" | |
config :hound, driver: "selenium" | |
config :hound, browser: "firefox" | |
# Start with default driver at port 4444 and use firefox | |
#config :hound, port: 4444, browser: "firefox" | |
# Define your application's host and port (defaults to "http://localhost:4001") | |
config :hound, app_host: "http://localhost", app_port: 4000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule HelloPhoenix.SampleTest do | |
use HelloPhoenix.ConnCase | |
ExUnit.start | |
# Import Hound helpers | |
use Hound.Helpers | |
# Start a Hound session | |
hound_session | |
IO.puts "sample test" | |
test "GET /" do | |
navigate_to "/" | |
assert page_source =~ "Welcome to Phoenix" | |
end | |
IO.puts "after test block" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ConnCase
?ExUnit.start
and remove it from your test file