Skip to content

Commit 1c81a11

Browse files
Charlie Egan and Elena Tanasoiuelenatanasoiu
authored andcommitted
Test suite being updated to deal with mocha
This commit will remove a test that is no longer compatible with the new version of mocha. The previous versions of mocha would incorrectly leave "fragment_name_with_digest" as a visible method. In the new version, this method is removed for versions of rails 4 and above.
1 parent 06030b8 commit 1c81a11

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

gemfiles/rails_5_0.gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ gem "rake"
66
gem "mocha", :require => false
77
gem "appraisal"
88
gem "pry"
9-
gem "railties", ">= 5.0.0.beta2", "< 5.1"
10-
gem "actionpack", ">= 5.0.0.beta2", "< 5.1"
11-
gem "activemodel", ">= 5.0.0.beta2", "< 5.1"
9+
gem "railties", "~> 5.0.0"
10+
gem "actionpack", "~> 5.0.0"
11+
gem "activemodel", "~> 5.0.0"
1212

1313
gemspec :path => "../"

test/jbuilder_template_test.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -307,18 +307,6 @@ def assert_collection_rendered(result, context = nil)
307307
assert_equal %w[a b c], result
308308
end
309309

310-
test "fragment caching works with previous version of cache digests" do
311-
undef_context_methods :cache_fragment_name
312-
313-
@context.expects :fragment_name_with_digest
314-
315-
jbuild <<-JBUILDER
316-
json.cache! "cachekey" do
317-
json.name "Cache"
318-
end
319-
JBUILDER
320-
end
321-
322310
test "fragment caching works with current cache digests" do
323311
undef_context_methods :fragment_name_with_digest
324312

0 commit comments

Comments
 (0)