eukaliptus 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,11 +3,11 @@ Bundler::GemHelper.install_tasks
3
3
 
4
4
  require 'rubygems'
5
5
  require 'rake/testtask'
6
- require 'rake/rdoctask'
6
+ #require 'rdoc/task'
7
7
 
8
8
  task :default => :test
9
9
 
10
- desc 'Test the typus plugin.'
10
+ desc 'Test the gem.'
11
11
  Rake::TestTask.new(:test) do |t|
12
12
  t.libs << 'lib'
13
13
  t.libs << 'test'
@@ -1,3 +1,3 @@
1
1
  module Eukaliptus
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
3
3
  end
@@ -4,15 +4,28 @@ class TestEukaliptus < MiniTest::Unit::TestCase
4
4
  include Rack::Test::Methods
5
5
 
6
6
  def app
7
- Eukaliptus::Middleware.new
7
+ Eukaliptus::Middleware.new(lambda { |env| [200, {}, "Coolness"] })
8
8
  end
9
9
 
10
- def test_eukaliptus_headers
11
- skip "Test P3p header"
10
+ def test_respond_p3p_headers
11
+ get '/cookie_fix'
12
+ assert_equal last_response["P3P"], 'CP="HONK HONK! http://graeme.per.ly/p3p-policies-are-a-joke"'
12
13
  end
13
14
 
14
- def test_rack_request_params
15
+ def test_should_redirect
15
16
  get '/cookie_fix'
16
- assert_equal "http://example.org/cookie_fix", last_request.url
17
+ assert last_response.redirect?
18
+ end
19
+
20
+ def test_should_redirect_to_param
21
+ get '/cookie_fix', :redirect_to => '/somewhere'
22
+ assert_equal last_response['Location'], '/somewhere'
23
+ end
24
+
25
+ def test_should_respond_with_cookie
26
+ get '/cookie_fix', :redirect_to => '/'
27
+
28
+ assert_instance_of String, last_response.body
29
+ assert_equal 'Cookie Setted', last_response.body
17
30
  end
18
31
  end
@@ -1,13 +1,21 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
2
 
3
+ gem 'minitest'
4
+ require 'minitest/autorun'
3
5
  require 'minitest/unit'
4
6
  require 'minitest/spec'
7
+ require 'minitest/pride'
5
8
  require 'rack/test'
6
9
 
7
10
  $LOAD_PATH.unshift(File.dirname(__FILE__))
8
11
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
9
12
  require 'rails'
10
13
  require 'eukaliptus'
14
+ require 'eukaliptus/view_helpers/facebook_helpers'
15
+
16
+ module ::Facebook
17
+ APP_ID = '123456'
18
+ end
11
19
 
12
20
  MiniTest::Unit.autorun
13
21
 
@@ -1,10 +1,22 @@
1
1
  require 'test_helper'
2
2
 
3
- describe "Eukaliptus::FacebookHelpersTest" do
4
- describe "when asked about a helper" do
5
- it "must respond positively" do
6
- skip "Possitive"
7
- end
8
- end
9
3
 
4
+ class FacebookHelpersTest < MiniTest::Spec
5
+
6
+ include Eukaliptus::FacebookHelpers
7
+
8
+ before do
9
+ require 'erubis'
10
+ require 'active_support/core_ext/string/output_safety'
11
+ end
12
+
13
+ it "should_raise_exception_with_fb_login" do
14
+ assert_raises RuntimeError do
15
+ fb_login
16
+ end
17
+ end
18
+
19
+ it "should_return_fb_init_js" do
20
+ assert_instance_of ActiveSupport::SafeBuffer, fb_init
21
+ end
10
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eukaliptus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,12 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-07-16 00:00:00.000000000 +02:00
13
+ date: 2011-07-17 00:00:00.000000000 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: koala
18
- requirement: &2157174160 !ruby/object:Gem::Requirement
18
+ requirement: &2161137400 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 1.0.0
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2157174160
26
+ version_requirements: *2161137400
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
- requirement: &2157173580 !ruby/object:Gem::Requirement
29
+ requirement: &2161136880 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *2157173580
37
+ version_requirements: *2161136880
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rack-test
40
- requirement: &2157172960 !ruby/object:Gem::Requirement
40
+ requirement: &2161136380 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,7 +45,7 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *2157172960
48
+ version_requirements: *2161136380
49
49
  description: Eukaliptus is a set of helpers and bug fixes for browsers to help you
50
50
  build Facebook iframe applications or user fan tabs.
51
51
  email: