Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
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
@igorffs

This comment has been minimized.

Copy link

igorffs commented Feb 18, 2016

  • Can you add your ConnCase?
  • Check if your test_helper.exs already has ExUnit.start and remove it from your test file
  • Keep just one hound config, if you need to incluse other options just add it for the single config:
# Try just `config :hound, driver: "selenium"` first
config :hound, driver: "selenium", browser: "firefox"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.