- bundle exec rubocop -f fuubar
- bundle exec rake jshint
- bundle exec rake test:db
+ - bundle exec rake test:system
# Needed in development as well so rake can see konacha tasks
group :development, :test do
+ gem "capybara", "~> 2.13"
gem "coveralls", :require => false
gem "factory_bot_rails"
gem "jshint"
- # gem "konacha"
gem "poltergeist"
+ gem "puma", "~> 3.7"
end
progress (3.4.0)
psych (2.2.4)
public_suffix (3.0.0)
+ puma (3.10.0)
r2 (0.2.7)
rack (2.0.3)
rack-cors (1.0.2)
autoprefixer-rails
bigdecimal (~> 1.1.0)
canonical-rails
+ capybara (~> 2.13)
coffee-rails (~> 4.2)
composite_primary_keys (~> 10.0.0)
coveralls
pg
poltergeist
psych
+ puma (~> 3.7)
r2 (~> 0.2.7)
rack-cors
rack-uri_sanitizer
namespace :test do
task "lib" => "test:prepare" do
$LOAD_PATH << "test"
- Minitest.rake_run(["test/lib"])
+ Rails::TestUnit::Runner.rake_run(["test/lib"])
end
end
--- /dev/null
+require "test_helper"
+require "capybara/poltergeist"
+
+WebMock.disable_net_connect!(:allow_localhost => true)
+
+class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
+ driven_by :poltergeist, :screen_size => [1400, 1400]
+
+ def initialize(*args)
+ stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
+ .to_return(:status => 404)
+ super(*args)
+ end
+end
--- /dev/null
+require "application_system_test_case"
+
+class SiteTest < ApplicationSystemTestCase
+ test "visiting the index" do
+ visit "/"
+
+ assert_selector "h1", :text => "OpenStreetMap"
+ end
+end