diff --git a/.travis.yml b/.travis.yml index 75cc2a0..f10dbee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,21 @@ sudo: false cache: bundler +before_install: gem update bundler --no-document + rvm: - 1.9.3 - 2.0.0 - 2.1 - 2.2 - - jruby + - 2.3.3 + - jruby-9.1.15.0 - ruby-head + matrix: fast_finish: true + allow_failures: + - rvm: ruby-head + notifications: email: false irc: diff --git a/Gemfile b/Gemfile index 0243083..44323a5 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,5 @@ source 'https://rubygems.org' # Specify your gem's dependencies in rails-dom-testing.gemspec gemspec + +gem "nokogiri", RUBY_VERSION < "2.1" ? "~> 1.6.0" : ">= 1.7" diff --git a/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb b/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb index 185ef0f..eb30f94 100644 --- a/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb +++ b/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb @@ -74,6 +74,7 @@ def extract_selector raise ArgumentError, "Expecting a selector as the first argument" end + selector = selector.dup context.substitute!(selector, @values) selector end diff --git a/lib/rails/dom/testing/version.rb b/lib/rails/dom/testing/version.rb index cb7f6dc..757d6b6 100644 --- a/lib/rails/dom/testing/version.rb +++ b/lib/rails/dom/testing/version.rb @@ -1,7 +1,7 @@ module Rails module Dom module Testing - VERSION = "1.0.7" + VERSION = "1.0.9" end end end diff --git a/rails-dom-testing.gemspec b/rails-dom-testing.gemspec index 885de19..a61342a 100644 --- a/rails-dom-testing.gemspec +++ b/rails-dom-testing.gemspec @@ -17,8 +17,8 @@ Gem::Specification.new do |spec| spec.test_files = Dir["test/**/*"] spec.require_paths = ["lib"] - spec.add_dependency "nokogiri", "~> 1.6.0" - spec.add_dependency "activesupport", ">= 4.2.0.beta", "< 5.0" + spec.add_dependency "nokogiri", "~> 1.6" + spec.add_dependency "activesupport", ">= 4.2.0", "< 5.0" spec.add_dependency "rails-deprecated_sanitizer", '>= 1.0.1' spec.add_development_dependency "bundler", "~> 1.3" diff --git a/test/selector_assertions_test.rb b/test/selector_assertions_test.rb index 7ac472a..74ccbb3 100644 --- a/test/selector_assertions_test.rb +++ b/test/selector_assertions_test.rb @@ -18,6 +18,11 @@ def assert_failure(message, &block) # Test assert select. # + def test_frozen_selector_substitution + render_html %Q{