sashimi 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG
CHANGED
data/lib/sashimi/version.rb
CHANGED
data/sashimi.gemspec
CHANGED
@@ -241,40 +241,46 @@ class AbstractRepositoryTest < Test::Unit::TestCase
|
|
241
241
|
assert_equal cached_plugins, repository.class.cache_content
|
242
242
|
end
|
243
243
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
244
|
+
uses_mocha 'TestAbstractRepositoryCache' do
|
245
|
+
def test_should_add_a_new_plugin_to_cache
|
246
|
+
with_clear_cache do
|
247
|
+
with_path local_repository_path do
|
248
|
+
create_plugin_directory('brand_new')
|
249
|
+
plugin = create_plugin(nil, 'git://github.com/jodosha/brand_new.git')
|
250
|
+
repository.add_to_cache(plugin)
|
251
|
+
assert_equal cached_plugins.merge(plugin.to_hash), repository.class.cache_content
|
252
|
+
end
|
251
253
|
end
|
252
254
|
end
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
255
|
+
|
256
|
+
def test_should_merge_an_existent_plugin_into_cache
|
257
|
+
File.expects(:atomic_write).with('.plugins', "./")
|
258
|
+
with_clear_cache do
|
259
|
+
with_path local_repository_path do
|
260
|
+
repository.add_to_cache(plugin)
|
261
|
+
assert_equal cached_plugins.merge(plugin.to_hash), repository.class.cache_content
|
262
|
+
end
|
260
263
|
end
|
261
264
|
end
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
265
|
+
|
266
|
+
def test_remove_from_cache
|
267
|
+
File.expects(:atomic_write).with('.plugins', "./")
|
268
|
+
with_clear_cache do
|
269
|
+
with_path local_repository_path do
|
270
|
+
repository.remove_from_cache
|
271
|
+
assert_not repository.class.plugins_names.include?(plugin.name)
|
272
|
+
end
|
269
273
|
end
|
270
274
|
end
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
275
|
+
|
276
|
+
def test_write_to_cache
|
277
|
+
File.expects(:atomic_write).with('.plugins', "./")
|
278
|
+
repository.class.expects(:cache_content).returns plugin.to_hash # mock the atomic write result
|
279
|
+
with_clear_cache do
|
280
|
+
with_path plugins_path do
|
281
|
+
repository.write_to_cache(plugin.to_hash)
|
282
|
+
assert_equal plugin.to_hash, repository.class.cache_content
|
283
|
+
end
|
278
284
|
end
|
279
285
|
end
|
280
286
|
end
|
data/test/unit/version_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sashimi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-03 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|