Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2014-06-17 00:40:40 +0400
committerGleb Mazovetskiy <glex.spb@gmail.com>2014-06-17 00:40:40 +0400
commitb198b6c255b993eca10badc7724a193f24d36e30 (patch)
tree9da40d16ba3a08e6517e069136067caa5ce1eecc /test
parent7eed336d8a3470db109ee952b7bea9a8e4bb7ed4 (diff)
update test config
Diffstat (limited to 'test')
-rw-r--r--test/dummy_rails/app/views/pages/root.html.slim2
-rw-r--r--test/sass_test.rb1
-rw-r--r--test/support/integration_test.rb15
-rw-r--r--test/test_helper.rb18
4 files changed, 17 insertions, 19 deletions
diff --git a/test/dummy_rails/app/views/pages/root.html.slim b/test/dummy_rails/app/views/pages/root.html.slim
index 9c6f6c8..4d07587 100644
--- a/test/dummy_rails/app/views/pages/root.html.slim
+++ b/test/dummy_rails/app/views/pages/root.html.slim
@@ -32,7 +32,7 @@
form.form-inline
.form-group
- input.sr-only for="exampleInputEmail2" Email address
+ label.sr-only for="exampleInputEmail2" Email address
input.form-control#exampleInputEmail2 type="email" placeholder="Enter email"
.checkbox
label
diff --git a/test/sass_test.rb b/test/sass_test.rb
index 1239c34..7f4acac 100644
--- a/test/sass_test.rb
+++ b/test/sass_test.rb
@@ -9,6 +9,7 @@ class SassTest < Test::Unit::TestCase
def setup
Dir.chdir DUMMY_PATH do
+ %x[rm -rf .sass-cache/]
%x[bundle]
end
css_path = File.join Bootstrap.gem_path, 'tmp/bootstrap-sass-only.css'
diff --git a/test/support/integration_test.rb b/test/support/integration_test.rb
index 54fb49e..b49bb3a 100644
--- a/test/support/integration_test.rb
+++ b/test/support/integration_test.rb
@@ -4,7 +4,7 @@ module IntegrationTest
def setup
super
- %x[rm -rf test/dummy/tmp/cache]
+ %x[rm -rf test/dummy_rails/tmp/cache]
end
def teardown
@@ -13,17 +13,10 @@ module IntegrationTest
Capybara.use_default_driver
end
- def after_teardown
- if @passed.blank?
- screenshot!
- puts "Failed at: #{current_url}"
- end
- end
-
def screenshot!
screenshot_dir = File.expand_path('../../tmp/', File.dirname(__FILE__))
- page.driver.render(File.join(screenshot_dir, "#{@__name__}.png"), :full => true)
+ page.driver.render(File.join(screenshot_dir, "#{name}.png"), :full => true)
source = page.evaluate_script("document.getElementsByTagName('html')[0].outerHTML") rescue nil
- File.open(File.join(screenshot_dir, "#{@__name__}.html"), 'w') { |f| f.write(source) } if source
+ File.open(File.join(screenshot_dir, "#{name}.html"), 'w') { |f| f.write(source) } if source
end
-end \ No newline at end of file
+end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 21b3b5d..a8cf3bf 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -15,6 +15,16 @@ Dir[File.expand_path("./support/**/*.rb", File.dirname(__FILE__))].each { |f| re
#= Capybara + Poltergeist
require 'capybara/rails'
require 'capybara/poltergeist'
+
+Capybara.register_driver :poltergeist do |app|
+ Capybara::Poltergeist::Driver.new(
+ app,
+ # inspector: '/Applications/Chromium.app/Contents/MacOS/Chromium', # open in inspector: page.driver.debug
+ window_size: [1280, 1024],
+ js_errors: true, debug: true
+ )
+end
+
Capybara.configure do |config|
config.app_host = 'http://localhost:7000'
config.default_driver = :poltergeist
@@ -22,10 +32,4 @@ Capybara.configure do |config|
config.server_port = 7000
config.default_wait_time = 10
end
-Capybara.register_driver :poltergeist do |app|
- Capybara::Poltergeist::Driver.new(
- app,
- # inspector: '/Applications/Chromium.app/Contents/MacOS/Chromium', # open in inspector: page.driver.debug
- window_size: [1280, 1024]
- )
-end
+