tiny_mce_helper 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Binary file
Binary file
@@ -3,14 +3,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
3
3
  uses_mocha 'mocking install/update' do
4
4
  class TinyMceInstallerTest < Test::Unit::TestCase
5
5
  def setup
6
- TinyMCEHelper.expects(:open).with('http://sourceforge.net/project/showfiles.php?group_id=103281&package_id=111430').returns(open('test/files/sourceforge.html')) unless live?
7
-
8
6
  # Set up public path
9
7
  FileUtils.mkdir_p("#{Rails.root}/public/javascripts")
10
8
  end
11
9
 
12
10
  def test_should_save_latest_version_to_default_target
13
- TinyMCEHelper.expects(:open).with('http://downloads.sourceforge.net/tinymce/tinymce_3_0_8.zip?modtime=1209567317&big_mirror=0').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_0_8.zip")) unless live?
11
+ TinyMCEHelper.expects(:open).with('http://sourceforge.net/project/showfiles.php?group_id=103281&package_id=111430').returns(open('test/files/sourceforge.html')) unless live?
12
+ TinyMCEHelper.expects(:open).with('http://prdownloads.sourceforge.net/tinymce/tinymce_3_2_2_3.zip?download').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_2_2_3.zip")) unless live?
14
13
  TinyMCEHelper.install(:force => true)
15
14
 
16
15
  assert File.exists?("#{Rails.root}/public/javascripts/tiny_mce")
@@ -21,23 +20,24 @@ uses_mocha 'mocking install/update' do
21
20
  assert source.include?('tinymce')
22
21
  else
23
22
  assert source.include?("majorVersion : '3'");
24
- assert source.include?("minorVersion : '0.8'");
23
+ assert source.include?("minorVersion : '2.2.3'");
25
24
  end
26
25
  end
27
26
 
28
27
  def test_should_allow_custom_version
29
- TinyMCEHelper.expects(:open).with('http://downloads.sourceforge.net/tinymce/tinymce_3_0_6_2.zip?modtime=1207580953&big_mirror=0').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_0_6_2.zip")) unless live?
30
- TinyMCEHelper.install(:version => '3.0.6.2', :force => true)
28
+ TinyMCEHelper.expects(:open).with('http://prdownloads.sourceforge.net/tinymce/tinymce_3_2_2.zip?download').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_2_2.zip")) unless live?
29
+ TinyMCEHelper.install(:version => '3.2.2', :force => true)
31
30
 
32
31
  assert File.exists?("#{Rails.root}/public/javascripts/tiny_mce")
33
32
 
34
33
  source = File.read("#{Rails.root}/public/javascripts/tiny_mce/tiny_mce_src.js")
35
34
  assert source.include?("majorVersion : '3'");
36
- assert source.include?("minorVersion : '0.6.2'");
35
+ assert source.include?("minorVersion : '2.2'");
37
36
  end
38
37
 
39
38
  def test_should_allow_custom_target
40
- TinyMCEHelper.expects(:open).with('http://downloads.sourceforge.net/tinymce/tinymce_3_0_8.zip?modtime=1209567317&big_mirror=0').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_0_8.zip")) unless live?
39
+ TinyMCEHelper.expects(:open).with('http://sourceforge.net/project/showfiles.php?group_id=103281&package_id=111430').returns(open('test/files/sourceforge.html')) unless live?
40
+ TinyMCEHelper.expects(:open).with('http://prdownloads.sourceforge.net/tinymce/tinymce_3_2_2_3.zip?download').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_2_2_3.zip")) unless live?
41
41
  TinyMCEHelper.install(:target => 'public/javascripts/tinymce', :force => true)
42
42
 
43
43
  assert File.exists?("#{Rails.root}/public/javascripts/tinymce")
@@ -105,7 +105,7 @@ uses_mocha 'mocking install/update' do
105
105
  def expects_file_requests
106
106
  unless live?
107
107
  TinyMCEHelper.expects(:open).with('http://sourceforge.net/project/showfiles.php?group_id=103281&package_id=111430').returns(open('test/files/sourceforge.html'))
108
- TinyMCEHelper.expects(:open).with('http://downloads.sourceforge.net/tinymce/tinymce_3_0_8.zip?modtime=1209567317&big_mirror=0').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_0_8.zip"))
108
+ TinyMCEHelper.expects(:open).with('http://prdownloads.sourceforge.net/tinymce/tinymce_3_2_2_3.zip?download').yields(open("#{EXPANDED_RAILS_ROOT}/../files/tinymce_3_2_2_3.zip"))
109
109
  end
110
110
  end
111
111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_mce_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Pfeifer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-14 00:00:00 -05:00
12
+ date: 2009-04-13 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -26,9 +26,9 @@ files:
26
26
  - tasks/tiny_mce_helper_tasks.rake
27
27
  - test/test_helper.rb
28
28
  - test/files
29
- - test/files/tinymce_3_0_6_2.zip
30
29
  - test/files/sourceforge.html
31
- - test/files/tinymce_3_0_8.zip
30
+ - test/files/tinymce_3_2_2_3.zip
31
+ - test/files/tinymce_3_2_2.zip
32
32
  - test/files/wiki.html
33
33
  - test/unit
34
34
  - test/unit/tiny_mce_helper_test.rb
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements: []
68
68
 
69
69
  rubyforge_project: pluginaweek
70
- rubygems_version: 1.2.0
70
+ rubygems_version: 1.3.1
71
71
  signing_key:
72
72
  specification_version: 2
73
73
  summary: Adds helper methods for creating the TinyMCE initialization script.
Binary file
Binary file