Skip to content

Commit

Permalink
Merge pull request #1409 from tvdeyen/capybara-3
Browse files Browse the repository at this point in the history
Capybara 3.0 support
  • Loading branch information
tvdeyen authored Apr 11, 2018
2 parents fef5458 + 5dc1a5b commit a9cd2e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ group :development, :test do
gem 'rubocop', require: false
gem 'listen'
end
gem 'capybara', '~> 2.4'
gem 'capybara-screenshot', '>= 1.0.18'
gem 'capybara', '~> 3.0'
gem 'capybara-screenshot', '~> 1.0'
gem 'database_cleaner', '~> 1.3'
gem 'factory_bot_rails', '~> 4.5'
gem 'selenium-webdriver', '~> 3.8'
Expand Down
18 changes: 6 additions & 12 deletions spec/features/admin/tinymce_feature_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@

it 'base path should be set to tinymce asset folder' do
visit admin_dashboard_path
expect(page).to have_content <<-TINYMCE.strip_heredoc
var tinyMCEPreInit = {
base: '/assets/tinymce',
suffix: '.min'
};
TINYMCE
expect(page).to have_content(
"var tinyMCEPreInit = { base: '/assets/tinymce', suffix: '.min' };"
)
end

context 'with asset host' do
Expand All @@ -22,12 +19,9 @@

it 'base path should be set to tinymce asset folder' do
visit admin_dashboard_path
expect(page).to have_content <<-TINYMCE.strip_heredoc
var tinyMCEPreInit = {
base: 'http://www.example.com/assets/tinymce',
suffix: '.min'
};
TINYMCE
expect(page).to have_content(
"var tinyMCEPreInit = { base: 'http://www.example.com/assets/tinymce', suffix: '.min' };"
)
end
end
end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
Capybara.default_driver = :rack_test
Capybara.default_selector = :css
Capybara.ignore_hidden_elements = false
Capybara.server = :webrick

Shoulda::Matchers.configure do |config|
config.integrate do |with|
Expand Down

0 comments on commit a9cd2e1

Please sign in to comment.